struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24511] New: - javascript generation with CDATA
Date Fri, 07 Nov 2003 20:08:15 GMT
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

           Summary: javascript generation with CDATA
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validator Framework
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: rvh3@comcast.net


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");

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


Mime
View raw message