Do not escape double quotes in tiddler DIVs to save space (#5383)

* double quotes are no longer escaped in html bodies

* changed tiddlyweb's html-div-tiddler; documentation

French version still needs a translation though
This commit is contained in:
Cameron Fischer
2021-04-02 09:32:32 +01:00
committed by GitHub
parent 3b35411aba
commit ef6307a64e
5 changed files with 19 additions and 2 deletions
+9
View File
@@ -515,6 +515,15 @@ exports.htmlEncode = function(s) {
}
};
// Converts like htmlEncode, but forgets the double quote for brevity
exports.htmlTextEncode = function(s) {
if(s) {
return s.toString().replace(/&/mg,"&amp;").replace(/</mg,"&lt;").replace(/>/mg,"&gt;");
} else {
return "";
}
};
// Converts all HTML entities to their character equivalents
exports.entityDecode = function(s) {
var converter = String.fromCodePoint || String.fromCharCode,