mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-12 07:58:05 +00:00
Merge pull request #11 from dryabov/master
fix smiles after html entity
This commit is contained in:
commit
ad65716dcb
@ -81,9 +81,15 @@
|
|||||||
var rep = $s.replacement
|
var rep = $s.replacement
|
||||||
.replace(/\{eId\}/g, $s.map[pattern]);
|
.replace(/\{eId\}/g, $s.map[pattern]);
|
||||||
|
|
||||||
text = text
|
if (pattern[0] === ';') {
|
||||||
.replace(new RegExp($t.quote(pattern), "g"), rep)
|
text = text
|
||||||
.replace(new RegExp($t.quote(encPattent), "g"), rep);
|
.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;
|
return text;
|
||||||
|
@ -269,4 +269,3 @@ function _extractHashtag(s) {
|
|||||||
function escapeHtmlEntities(str) {
|
function escapeHtmlEntities(str) {
|
||||||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user