mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-20 18:27:39 +00:00
Don't HTML encode single quotes
They don’t get automatically decoded when the browser reads the
resulting HTML. So, instead, we’ll solve
1e9e1a1fdc
by switching to double quotes
for attribute values.
This commit is contained in:
@@ -363,10 +363,10 @@ exports.getRelativeDate = function(delta) {
|
||||
};
|
||||
};
|
||||
|
||||
// Convert & to "&", < to "<", > to ">", " to """ ' to "'"
|
||||
// Convert & to "&", < to "<", > to ">", " to """
|
||||
exports.htmlEncode = function(s) {
|
||||
if(s) {
|
||||
return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""").replace(/\'/mg,"'");
|
||||
return s.toString().replace(/&/mg,"&").replace(/</mg,"<").replace(/>/mg,">").replace(/\"/mg,""");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user