mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-23 16:56:03 +00:00
Test improvements and associated bug fixes
This commit is contained in:
@@ -57,12 +57,12 @@ utils.convertFromYYYYMMDDHHMMSSMMM = function(d)
|
||||
// Convert & to "&", < to "<", > to ">" and " to """
|
||||
utils.htmlEncode = function(s)
|
||||
{
|
||||
return s.replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""");
|
||||
return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""");
|
||||
};
|
||||
|
||||
// Convert "&" to &, "<" to <, ">" to > and """ to "
|
||||
utils.htmlDecode = function(s)
|
||||
{
|
||||
return s.replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&");
|
||||
return s.toString().replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user