Browse Source

Merge pull request #11 from dryabov/master

fix smiles after html entity
master
iHedgehog 11 years ago
parent
commit
ad65716dcb
  1. 12
      jquery-emotions/jquery.emotions.js
  2. 1
      js/twister_formatpost.js

12
jquery-emotions/jquery.emotions.js

@ -81,9 +81,15 @@ @@ -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;

1
js/twister_formatpost.js

@ -269,4 +269,3 @@ function _extractHashtag(s) { @@ -269,4 +269,3 @@ function _extractHashtag(s) {
function escapeHtmlEntities(str) {
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
}

Loading…
Cancel
Save