[ http://issues.apache.org/struts/browse/STR-1831?page=all ] David Evans reopened STR-1831: ------------------------------
Assign To: David Evans (was: Struts Developer Mailing List) > javascript generation with CDATA > -------------------------------- > > Key: STR-1831 > URL: http://issues.apache.org/struts/browse/STR-1831 > Project: Struts Action 1 > Type: Improvement > Components: Action > Versions: 1.1 Final > Environment: Operating System: All > Platform: All > Reporter: Rob Hannah > Assignee: David Evans > Priority: Minor > Fix For: 1.2 Family > > Issue: Current browsers don't like CDATA hanging out inside of a script tag. > This can easily be resolved by prepending to begin/end components of CDATA the > JavaScript one-line comment ( '//' ). Modified generated html to include '//' > on the CDATA begin/end components tested successfully (as in 'alert box pops > up > on validation failure') on Mozilla 1.5, IE 5.5, IE 6.0. Validates on > http://validator.w3.org/ . Works in both transitional and strict XHTML modes. > Suggested patch (based on 1.1 release): > diff JavascriptValidatorTag.old JavascriptValidatorTag.java > 570c570 > < sb.append("<![CDATA[\r\n"); > --- > > sb.append("//<![CDATA[\r\n"); > 636c636 > < sb.append("]]>\r\n"); > --- > > sb.append("//]]>\r\n"); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]