Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316223 - [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.2.1   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: WI 49464
Keywords:
: 112807 258676 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-08 19:27 EDT by Nick Sandonato CLA
Modified: 2010-10-04 16:39 EDT (History)
2 users (show)

See Also:
thatnitind: review+


Attachments
patch (4.97 KB, patch)
2010-06-08 19:31 EDT, Nick Sandonato CLA
no flags Details | Diff
unit test updates (6.44 KB, patch)
2010-06-08 20:58 EDT, Nick Sandonato CLA
no flags Details | Diff
tweaked patch (4.94 KB, patch)
2010-06-15 10:40 EDT, Nick Sandonato CLA
no flags Details | Diff
updated unit tests (17.79 KB, patch)
2010-06-15 13:20 EDT, Nick Sandonato CLA
no flags Details | Diff
updated unit tests (17.30 KB, patch)
2010-06-15 13:26 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:27:41 EDT
+++ This bug was initially created as a clone of Bug #316222 for the purposes of fixing in 3.2 +++

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-08 19:31:08 EDT
Created attachment 171481 [details]
patch

Tokenizer updates.
Comment 2 Nick Sandonato CLA 2010-06-08 20:58:30 EDT
Created attachment 171484 [details]
unit test updates

Have to update some of the unit tests.
Comment 3 Nitin Dahyabhai CLA 2010-06-08 23:24:42 EDT
Are you sure about the XML changes?  I thought this should only apply to HTML and maybe JSP.
Comment 4 Nick Sandonato CLA 2010-06-09 10:36:29 EDT
(In reply to comment #3)
> Are you sure about the XML changes?  I thought this should only apply to HTML
> and maybe JSP.

While it does only apply to HTML and JSP, this does have some positives for XML. Instead of the tokenizer getting confused for a < or > in attribute values, it recovers and the attribute value region remains intact. The validator will then identify that the < or > is invalid in an XML.
Comment 5 Nick Sandonato CLA 2010-06-15 10:40:41 EDT
Created attachment 171936 [details]
tweaked patch

Removed the unnecessary assignment of 'fShouldLoadBuffered = true;'
Comment 6 Nick Sandonato CLA 2010-06-15 13:20:24 EDT
Created attachment 171965 [details]
updated unit tests

Had to fix up some of the HTML unit tests and added some new ones.
Comment 7 Nick Sandonato CLA 2010-06-15 13:26:20 EDT
Created attachment 171967 [details]
updated unit tests
Comment 8 Nick Sandonato CLA 2010-06-29 13:41:54 EDT
Code released to Maintenance and HEAD
Comment 9 Nick Sandonato CLA 2010-06-29 14:14:13 EDT
*** Bug 112807 has been marked as a duplicate of this bug. ***
Comment 10 Nick Sandonato CLA 2010-10-04 16:39:56 EDT
*** Bug 258676 has been marked as a duplicate of this bug. ***