Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326303 - [validation] Text after HTML style comment in JavaScript region marked as validation error
Summary: [validation] Text after HTML style comment in JavaScript region marked as val...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Web (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: WI58192
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-27 09:36 EDT by Ian Tewksbury CLA
Modified: 2010-11-11 14:59 EST (History)
2 users (show)

See Also:
cmjaun: review+
thatnitind: review+


Attachments
Fix Patch (3.50 KB, patch)
2010-09-28 11:34 EDT, Ian Tewksbury CLA
thatnitind: iplog+
Details | Diff
updated version of Ian's patch (5.78 KB, patch)
2010-10-06 22:58 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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