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
1 changed files with 2 additions and 2 deletions

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":