En l'instant précis du 07/01/08 23:05, simon s'exprimait en ces termes:
Your could write a filter that convert
<script (.*)>(.*)</script>
to
<script $1><[CDATA[$2]]></script>

Or, as mentionned, patch the myfaces/tomhawk code?

In HTML, script tags are special, and the content within them is
effectively automatically escaped. A lot of the myfaces/tomahawk
components were written assuming this.

It does appear that xhtml treats script tags just like any other tag,
with no special rules, so CDATA really is necessary:
  http://www.w3.org/TR/xhtml1/#h-4.8

Patches to fix this would be gratefully received.

Regards,
Simon
Could be, but JSF specs do not mention xhtml, it only mention HTML4.01 if i remember well. And since HTML 4.01 is not xml, it has no idea what <![CDATA[ means. Only solution could be to have following kind of thing generated. However, am not sure XHTML allow it :/ (splitting script in 2 parts)

<script>
// <![CDATA[
....
// ]]!>

--
http://www.devlog.be (a belgian developer's logs)


Reply via email to