Add nbsp handling to htmlDecode

print-window-tiddler
Jermolene 2014-01-12 20:11:51 +00:00
rodzic 4b000fac72
commit b5d2b79a37
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -207,10 +207,10 @@ $tw.utils.deepDefaults = function(object /*, sourceObjectList */) {
};
/*
Convert "&amp;" to &, "&lt;" to <, "&gt;" to > and "&quot;" to "
Convert "&amp;" to &, "&nbsp;" to nbsp, "&lt;" to <, "&gt;" to > and "&quot;" to "
*/
$tw.utils.htmlDecode = function(s) {
return s.toString().replace(/&lt;/mg,"<").replace(/&gt;/mg,">").replace(/&quot;/mg,"\"").replace(/&amp;/mg,"&");
return s.toString().replace(/&lt;/mg,"<").replace(/&nbsp;/mg,"\x40").replace(/&gt;/mg,">").replace(/&quot;/mg,"\"").replace(/&amp;/mg,"&");
};
/*