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

Bug 316222

Summary: [parser] < or > in attribute values are not supported
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: jst.jspAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: ccc, nsand.dev
Version: 3.0.5Flags: thatnitind: review+
Target Milestone: 3.0.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
patch
none
updated patch
none
tweaked patch none

Description Nick Sandonato CLA 2010-06-08 19:26:16 EDT
A < or > in an attribute value, while perfectly legal, causes the parser to function incorrectly.

Examples:
<button value=">>"></button>
<button value="<<"></button>

In the case of JSP, it's assumed that what follows is going to be an embedded tag. So, we'll need to work with both the XMLTokenizer and JSPTokenizer.
Comment 1 Nick Sandonato CLA 2010-06-09 00:07:46 EDT
Created attachment 171490 [details]
patch

Patch
Comment 2 Nick Sandonato CLA 2010-06-09 11:50:30 EDT
Created attachment 171547 [details]
patch

Updated patch with generated tokenizers.
Comment 3 Nitin Dahyabhai CLA 2010-06-13 21:24:37 EDT
Would this supercede bug 258676?

JSPTokenizer.jflex gets a redundant 'fShouldLoadBuffered = true;' on line 803 and a commented yypushback() call on line 1717 that I'm not clear on.  Can you explain them?
Comment 4 Nick Sandonato CLA 2010-06-14 11:20:08 EDT
(In reply to comment #3)
> Would this supercede bug 258676?
> 
> JSPTokenizer.jflex gets a redundant 'fShouldLoadBuffered = true;' on line 803
> and a commented yypushback() call on line 1717 that I'm not clear on.  Can you
> explain them?

Yes, this would supercede bug 258676.

I had the redundant fShouldLoadBuffered = true because one of the existing clauses had it also. I can remove it. I removed the yypushback() because I do want to consume them so that they'll be included as part of the attribute value region. I don't want to have the opportunity for it to be reparsed as something else.
Comment 5 Nick Sandonato CLA 2010-06-14 11:31:17 EDT
Created attachment 171838 [details]
updated patch
Comment 6 Nick Sandonato CLA 2010-06-14 11:33:34 EDT
Created attachment 171841 [details]
tweaked patch
Comment 7 Carl Anderson CLA 2010-07-09 17:09:43 EDT
Committed to R3_0_5_patches