Hi all,
I think there's a bug in the way can.stache handles HTML
entities in attributes.
Example:
-
var s = '<span title="Next >">Next ></span>';
-
var t1 = can.mustache(s)({}).childNodes[0];
-
alert(t1.innerText); // "Next >" - correct
-
alert(t1.getAttribute("title")); // "Next >" - correct
-
var t2 = can.stache(s)({}).childNodes[0];
-
alert(t2.innerText); // "Next >" - correct
-
alert(t2.getAttribute("title")); // "Next >" - incorrect
I can patch HTMLParser.parseAttrs() to do HTML decoding prior to
calling handler.attrValue(chars), but I'm not sure this is the
correct solution, and would rather have this fixed officially.
Best regards,
Boris.