DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24511>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24511 javascript generation with CDATA [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Additional Comments From [EMAIL PROTECTED] 2003-11-08 17:24 ------- ---------- >From the Javadoc for cdata attribute: If set to "true" and XHTML has been enabled, the JavaScript will be wrapped in a CDATA section to prevent XML parsing. The default is "true" to comply with the W3C's recommendation. ---------- >From offline: The problem with using XHTML as designed is that browsers don't recognize CDATA properly in javascript. The W3C recommends that scripts be enclosed in CDATA sections. So, the <html:javascript> cdata attribute turns off CDATA as a compromise. This is really a browser problem and not a Struts problem. ---------- I see this as a Struts issue as Struts is presently generating invalid code. Either you generate the CDATA and some (all) browsers fail or you omit the CDATA and some (all) parsers/validators fail. Trust me...it'll be years before all 'current' browsers will support CDATA. My current project only recently shifted to IE5.5 from IE5. A prior project late last year (which required external user access) mandated support for Netscape 4.7x. And this tag - as it currently stands - will never generate code that works both in a browser and parser/validator world. The change I suggest works 100% in both worlds. To wit, the generated code with a html:javascript running inside of a html:html xhtml="true" tag would be (changing less/greater to '{/}' in case Bugzilla chokes): {script type="text/javascript"} //{![CDATA[ /* ...generated javascript code */ //]]} {/script} I am reopening this bug with the hope that my suggestion is accepted. And I will accept whatever final decision is made wrt this change (and only do it to the downloaded source for this project). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]