Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318281 - EL validation error for quote escaping
Summary: EL validation error for quote escaping
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Rakesh CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 05:12 EDT by Michael Chervil CLA
Modified: 2010-09-28 15:55 EDT (History)
6 users (show)

See Also:
nsand.dev: review+


Attachments
patch (858 bytes, patch)
2010-07-23 08:13 EDT, Rakesh CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Chervil CLA 2010-06-29 05:12:23 EDT
Build Identifier: 20100617-1415

These valid EL expressions are being reported as errors:

${'\"'}
${fn:replace(name,'\"','')}

The detection of quote escaping seems to be broken.

In Eclipse 3.5.1 I could classify this as warning by setting the validation option "EL syntax problem" to "Warning". This doesn't work in Eclipse 3.6. anymore.

Some similar bugs were already fixed: 151065, 150794 and lots of duplicates.

See also: http://www.eclipse.org/forums/index.php?t=msg&goto=543372

Reproducible: Always
Comment 1 Rakesh CLA 2010-07-23 08:13:37 EDT
Created attachment 175057 [details]
patch

JSPEL parser failed to take care of escaping of double quotes for strings delimited by single quotes.
Reference:
http://www.oracle.com/technology/sample_code/tutorials/jsp20/simpleel.html

Nick, i have attached changes only in .jjt file , as generating java files with latest javacc is giving compilation errors and i could not get hold of 3.2 version. I didn't risk changing java files manually to remove errors.Do you have javacc version 3.2?
Comment 2 Paul Furbacher CLA 2010-08-04 11:29:29 EDT
Just upgraded to 3.6 (Build id: 20100617-1415) and am encountering the same validation error with the following expression.  

${fn:substringAfter(columns[0],'{}')}"


It did not get flagged in 3.5 (Build id: 20100218-1602).
Comment 3 Nick Sandonato CLA 2010-09-28 15:55:31 EDT
Thanks, Rakesh. Patch looks good to me.
Comment 4 Nick Sandonato CLA 2010-09-28 15:55:46 EDT
Released the changes to HEAD and 3_2_Maintenance.