mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-03 11:28:01 +00:00
Add nbsp handling to htmlDecode
This commit is contained in:
@@ -207,10 +207,10 @@ $tw.utils.deepDefaults = function(object /*, sourceObjectList */) {
|
||||
};
|
||||
|
||||
/*
|
||||
Convert "&" to &, "<" to <, ">" to > and """ to "
|
||||
Convert "&" to &, " " to nbsp, "<" to <, ">" to > and """ to "
|
||||
*/
|
||||
$tw.utils.htmlDecode = function(s) {
|
||||
return s.toString().replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&");
|
||||
return s.toString().replace(/</mg,"<").replace(/ /mg,"\x40").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&");
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user