mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-21 18:23:13 +00:00
Single quotes should be HTML encoded
As raised here: https://groups.google.com/d/topic/tiddlywiki/nYvgcImvBt8/discussion
This commit is contained in:
parent
50cf85ae86
commit
1e9e1a1fdc
@ -363,10 +363,10 @@ exports.getRelativeDate = function(delta) {
|
||||
};
|
||||
};
|
||||
|
||||
// Convert & to "&", < to "<", > to ">" and " to """
|
||||
// Convert & to "&", < to "<", > to ">", " to """ ' to "'"
|
||||
exports.htmlEncode = function(s) {
|
||||
if(s) {
|
||||
return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""");
|
||||
return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""").replace(/\'/mg,"'");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user