You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Dale Newfield <Da...@Newfield.org> on 2008/02/07 17:34:30 UTC

Re: [struts-dev] html:form generates invalid xhml

Keith Winkler wrote:
> Which is not really valid xhtml on account of the un-escaped "&" characters.

The standard solution for this is wrapping your js code with the 
following javascript comments/xml CDATA declaration:

<script type="text/javascript">
//<![CDATA[
code goes here.
//]]>
</script>

Maybe this solution can be used to ensure xhtml conformance?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [struts-dev] html:form generates invalid xhml

Posted by Keith Winkler <ke...@gmail.com>.
>
> <script type="text/javascript">
> //<![CDATA[
> code goes here.
> //]]>
> </script>
>
> Maybe this solution can be used to ensure xhtml conformance?
>
>

Right.  That was the solution arrived at in the bug report discussion I
referenced.  But the patch seems to have never made it into the software.
Since the <html:form> tag generates the javascript, struts must create the
CDATA section, or use XML character entity references: &amp;&amp;, etc.

Keith