Hi All,
I've found an issue with how tapestry escapes its zone HTML content
within the JSON of the zone update XHR response.
Eg:
<t:zone ...>
<a href="" onclick="alert('hi'); return false;">hi</a>
</t:zone>
The HTML is stored within a String initialised with double quotes inside
the JSON, converting double quotes for attribute values with single
quotes. it also converts single quotes within the attribute values to
the "'" ASCII reference:
"<a href='' onclick='alert('hi'); return false;'>hi</a>"
This looks fine and works in FireFox, but IE8 throws a syntax error. I'm
guessing it converts ' to "'" too early and attempts to parse
"alert(" or something like that.
The only resolution I have is to put double quotes within the double
quoted attribute value, which works when supplying the attribute value
via a page property (ie java) but otherwise causes a tml parse
exception, and needless to say, is not very good html:
<a href="" onclick="alert("hi"); return false;">hi</a>
I think that when preparing the zone update JSON tapestry should escape
single quotes within attribute values via "\'" instead of "'". This
would resolve IE8's issue.
thoughts?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]