You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Andrew Kelly (JIRA)" <ji...@apache.org> on 2009/08/26 10:15:06 UTC
[jira] Commented: (STR-2893) FormTag doesn't render the focus
javascript compliant with xhtml
[ https://issues.apache.org/struts/browse/STR-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46693#action_46693 ]
Andrew Kelly commented on STR-2893:
-----------------------------------
It'd be nice to have this fixed earlier than v1.4, perhaps in v1.3.11.
The code for the fix is already present in the JavascriptValidatorTag class in the getJavascriptBegin/End methods...
if (this.isXhtml() && "true".equalsIgnoreCase(this.cdata)) {
sb.append("//<![CDATA[\r\n");
}
if (this.isXhtml() && "true".equalsIgnoreCase(this.cdata)) {
sb.append("//]]>\r\n");
}
This is important for us, as other have pointed out, the form tag doesn't render XHTML compliant javascript any more.
Regards,
Andy.
> FormTag doesn't render the focus javascript compliant with xhtml
> ----------------------------------------------------------------
>
> Key: STR-2893
> URL: https://issues.apache.org/struts/browse/STR-2893
> Project: Struts 1
> Issue Type: Bug
> Components: Tag Libraries
> Affects Versions: 1.2 Family
> Environment: Windows XP SP2, IBM Think Centre
> Reporter: Tedy Marcos Colombini
> Priority: Trivial
> Fix For: 1.4.0
>
>
> Taking a look at the FormTag code (precisely, the renderFocusJavascript() method), I found this:
> // xhtml script content shouldn't use the browser hiding trick
> if (!this.isXhtml()) {
> results.append(" <!--");
> results.append(lineEnd);
> }
> I guess the if statement should be the opposite, since we need javascript code inside <!-- ... --> for xhtml compliance, don't we?
> Also, the following snippet doesn't need the !this.isXhtml() check...
> if (!this.isXhtml() && this.scriptLanguage) {
> results.append(" language=\"JavaScript\"");
> }
> Regards, Tedy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.