mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
Fixed HTML encoding of rendered output
This commit is contained in:
parent
87aa8667ec
commit
5297fa690d
@ -60,7 +60,7 @@ WikiTextParser.prototype.renderAsHtml = function(store,title) {
|
|||||||
var tagBits = [element.type];
|
var tagBits = [element.type];
|
||||||
if(element.attributes) {
|
if(element.attributes) {
|
||||||
for(var a in element.attributes) {
|
for(var a in element.attributes) {
|
||||||
tagBits.push(a + "=\"" + element.attributes[a] + "\"");
|
tagBits.push(a + "=\"" + utils.htmlEncode(element.attributes[a]) + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output.push("<" + tagBits.join(" ") + (selfClosing ? " /" : "") + ">");
|
output.push("<" + tagBits.join(" ") + (selfClosing ? " /" : "") + ">");
|
||||||
@ -75,7 +75,7 @@ WikiTextParser.prototype.renderAsHtml = function(store,title) {
|
|||||||
for(var t=0; t<tree.length; t++) {
|
for(var t=0; t<tree.length; t++) {
|
||||||
switch(tree[t].type) {
|
switch(tree[t].type) {
|
||||||
case "text":
|
case "text":
|
||||||
output.push(tree[t].value);
|
output.push(utils.htmlEncode(tree[t].value);
|
||||||
break;
|
break;
|
||||||
case "br":
|
case "br":
|
||||||
case "img":
|
case "img":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user