Issue Details (XML | Word | Printable)

Key: SHALE-247
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Gary VanMatre
Reporter: Reind
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

s:validatorScript produces invalid html markup

Created: 03/Aug/06 03:58 PM   Updated: 21/Aug/06 11:28 PM
Return to search
Component/s: Core
Affects Version/s: 1.0.2
Fix Version/s: 1.0.3

File Attachments:
  Size
Text File Licensed for inclusion in ASF works site.patch 2006-08-03 04:02 PM Reind 0.9 kB
Environment: myfaces 1.1.5

Flags: Patch


 Description  « Hide
The javascript that the <s:validatorScript> component generates does not validate against XHTML 1.0 Transitional using the validator on http://validator.w3.org/.

The validation error happens because the component creates an extraneous html comment start/stop before and after the javascript it generates.

Output:
<script type="text/javascript" language="Javascript1.1">
<!--
<!--
var bCancel = false;
...
-->
//-->
Fix:

<script type="text/javascript" language="Javascript1.1"><!--

var bCancel = false;
...
...
//-->

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Reind added a comment - 03/Aug/06 04:02 PM
This patch makes a small change to:

org.apache.shale.component.ValidatorScript.writeScriptStart(ResponseWriter writer)
and
org.apache.shale.component.ValidatorScript.writeScriptEnd(ResponseWriter writer)

It removes the "<!--\n" from the former and "-->\n" from the later.

This fixes the xhtml validation issues - and, hopefully, doesn't cause any other issues.

Reind made changes - 03/Aug/06 04:02 PM
Field Original Value New Value
Attachment site.patch [ 13108 ]
Reind added a comment - 04/Aug/06 02:39 PM
Edit:
The attached patch is for 1.0.2 , not the nightly build. There seems to be another issue with validatorScript in the nightlies

Reind made changes - 04/Aug/06 02:39 PM
Affects Version/s Nightly [ 21715 ]
Affects Version/s 1.0.2 [ 21713 ]
Reind added a comment - 04/Aug/06 04:07 PM
Just wanted to add. I checked out a new copy of shale from subversion and validatorScript works (contrary to my previous post). Incidentally the patch work as well.

Gary VanMatre added a comment - 04/Aug/06 04:24 PM
I must have addressed this one in SHALE-217. But, thanks for the patch.

Gary VanMatre added a comment - 04/Aug/06 04:25 PM
Fixed with another resolution, SHALE-217.

Gary VanMatre made changes - 04/Aug/06 04:25 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Implemented [ 6 ]
Fix Version/s 1.0.3 [ 21714 ]
Gary VanMatre made changes - 07/Aug/06 03:24 AM
Resolution Implemented [ 6 ]
Status Closed [ 6 ] Reopened [ 4 ]
Assignee Gary VanMatre [ gvanmatre@comcast.net ]
Repository Revision Date User Message
ASF #429233 Mon Aug 07 03:31:19 UTC 2006 gvanmatre Patch submitted by Reind in SHALE-247 fixes a nested comment in the script tag.
Files Changed
MODIFY /shale/framework/trunk/shale-core/src/main/java/org/apache/shale/component/ValidatorScript.java

Gary VanMatre added a comment - 07/Aug/06 03:40 AM
The patch should be available in the 20060807 nightly. Thanks for the help.

Gary VanMatre made changes - 07/Aug/06 03:40 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
sean schofield made changes - 21/Aug/06 11:28 PM
Fix Version/s 1.0.3-SNAPSHOT [ 21714 ]
Fix Version/s 1.0.3 [ 21750 ]
Jeff Turner made changes - 09/Aug/07 07:16 AM
Workflow Struts [ 38617 ] Struts - editable closed status [ 42158 ]
Antonio Petrelli made changes - 08/Jan/09 08:57 AM
Workflow Struts - editable closed status [ 42158 ] Struts - editable closed status (temporary) [ 46213 ]
Antonio Petrelli made changes - 08/Jan/09 09:08 AM
Workflow Struts - editable closed status (temporary) [ 46213 ] Struts - editable closed status [ 52615 ]