1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fixed HTML encoding of rendered output

This commit is contained in:
Jeremy Ruston 2011-12-06 09:53:21 +00:00
parent 87aa8667ec
commit 5297fa690d

View File

@ -60,7 +60,7 @@ WikiTextParser.prototype.renderAsHtml = function(store,title) {
var tagBits = [element.type];
if(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 ? " /" : "") + ">");
@ -75,7 +75,7 @@ WikiTextParser.prototype.renderAsHtml = function(store,title) {
for(var t=0; t<tree.length; t++) {
switch(tree[t].type) {
case "text":
output.push(tree[t].value);
output.push(utils.htmlEncode(tree[t].value);
break;
case "br":
case "img":