Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326303

Summary: [validation] Text after HTML style comment in JavaScript region marked as validation error
Product: [WebTools] JSDT Reporter: Ian Tewksbury <itewksbu>
Component: WebAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: ccc, cmjaun
Version: 3.0.5Flags: cmjaun: review+
thatnitind: review+
Target Milestone: 3.0.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard: WI58192
Attachments:
Description Flags
Fix Patch
thatnitind: iplog+
updated version of Ian's patch none

Description Ian Tewksbury CLA 2010-09-27 09:36:06 EDT
Currently the JSDT validator does not support text after a leading opening HTML style comment in a JavaScript region.  This scenario is stated as valid in http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.3

Example:

<script type="text/javascript">
<!--  to hide script contents from old browsers
var v = "foo";
// -->
</script>
Comment 1 Ian Tewksbury CLA 2010-09-28 10:19:03 EDT
I have opened Bug 326420 and Bug 326422 to track getting this fixed in 3.2.2patches and 3.2.3/3.3 respectively.
Comment 2 Ian Tewksbury CLA 2010-09-28 11:34:36 EDT
Created attachment 179759 [details]
Fix Patch

This patch fixes up the JsTranslator to ignore the text after the leading HTML comment thats on the same line.
Comment 3 Nitin Dahyabhai CLA 2010-10-06 22:58:33 EDT
Created attachment 180381 [details]
updated version of Ian's patch

Updating Ian's patch to better use some nonvariants, and changing variable names so they're a little easier to follow.
Comment 4 Nitin Dahyabhai CLA 2010-11-11 14:19:42 EST
Carl, this is claimed to be in P20101016021951.  Can it be resolved?
Comment 5 Carl Anderson CLA 2010-11-11 14:59:12 EST
Committed to R3_0_5_patches