You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/11/07 21:08:15 UTC
DO NOT REPLY [Bug 24511] New: -
javascript generation with CDATA
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