fix smiles

This commit is contained in:
Denis Ryabov 2014-03-14 17:45:07 +04:00
parent c15731ebd1
commit 39ff8e4480
2 changed files with 9 additions and 5 deletions

View File

@ -81,9 +81,15 @@
var rep = $s.replacement
.replace(/\{eId\}/g, $s.map[pattern]);
text = text
.replace(new RegExp($t.quote(pattern), "g"), rep)
.replace(new RegExp($t.quote(encPattent), "g"), rep);
if (pattern[0] === ';') {
text = text
.replace(new RegExp("(^|\W)" + $t.quote(pattern), "g"), "\\1" + rep)
.replace(new RegExp("(^|\W)" + $t.quote(encPattent), "g"), "\\1" + rep);
} else {
text = text
.replace(new RegExp($t.quote(pattern), "g"), rep)
.replace(new RegExp($t.quote(encPattent), "g"), rep);
}
}
return text;

View File

@ -238,9 +238,7 @@ function htmlFormatMsg( msg, output, mentions ) {
function _parseText(text)
{
text = unescapeHtmlEntities(text);
text = $.emotions(text);
text = escapeHtmlEntities(text);
return text;
}