'use strict';

class Common {

    static sanitizeNickname(nickname) {
        return nickname.replace(/[^a-z]/ig, '').toLowerCase();
    }

    static avoidHighlighting(nickname) {
        return nickname.substring(0, 1) + '\u2060' + nickname.substring(1);
    }

    static ellipsis(str, length) {
        if (str.length > length) {
            return str.substring(0, length - 3) + '...';
        }

        return str;
    }
}

module.exports = Common;

@@ -64,38 +64,42 @@
 name) %7B%0A        
-return
+nickname =
  nickname.replac
@@ -115,16 +115,90 @@
 /ig, '')
+;%0A        nickname = nickname.replace('%5Bm%5D', '');%0A%0A        return nickname
 .toLower

Remove matrix prefix for sanitization