mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-24 22:33:16 +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) {
|
exports.htmlEncode = function(s) {
|
||||||
if(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 {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user