Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316222 - [parser] < or > in attribute values are not supported
Summary: [parser] < or > in attribute values are not supported
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 19:26 EDT by Nick Sandonato CLA
Modified: 2010-07-09 17:09 EDT (History)
2 users (show)

See Also:
thatnitind: review+


Attachments
patch (5.00 KB, patch)
2010-06-09 00:07 EDT, Nick Sandonato CLA
no flags Details | Diff
patch (20.75 KB, patch)
2010-06-09 11:50 EDT, Nick Sandonato CLA
no flags Details | Diff
updated patch (20.83 KB, patch)
2010-06-14 11:31 EDT, Nick Sandonato CLA
no flags Details | Diff
tweaked patch (20.69 KB, patch)
2010-06-14 11:33 EDT, Nick Sandonato CLA
no flags Details | Diff

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