Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338806 - Unexpected closing comment inserted in Javascript block
Summary: Unexpected closing comment inserted in Javascript block
Status: CLOSED DUPLICATE of bug 320001
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: jst.jsp CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 08:20 EST by Evgeniy Karyakin CLA
Modified: 2011-03-03 08:59 EST (History)
1 user (show)

See Also:


Attachments
Example JSP source code (1.08 KB, text/plain)
2011-03-03 08:21 EST, Evgeniy Karyakin CLA
no flags Details
Descriptive screenshot (20.33 KB, image/png)
2011-03-03 08:30 EST, Evgeniy Karyakin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy Karyakin CLA 2011-03-03 08:20:57 EST
Build Identifier: 20090920-1017

Starting type  JSP comment tag <%-- inside <script> tag leads to insertion of two hyphens just before closing </script> tag. When it happens in big long pages no one can spot it the moment it happened, and finally hit by unexpected javascript syntax errors in runtime.

Reproducible: Always

Steps to Reproduce:
1. Open example JSP file attached and place cursor on line 21.
2. Type JSP comment tag "<%--" (without quotes) symbol by symbol. Keep your eye on closing </script> tag.
3. After typing past hyphen you see two hyphens "--" just before closing script tag.

This happens if there is at least one Java code included between <script> and </script>, see lines 26-28 of the example source code. Remove these lines and this behaviour disappears.
Comment 1 Evgeniy Karyakin CLA 2011-03-03 08:21:48 EST
Created attachment 190260 [details]
Example JSP source code
Comment 2 Evgeniy Karyakin CLA 2011-03-03 08:30:21 EST
Created attachment 190264 [details]
Descriptive screenshot
Comment 3 Nick Sandonato CLA 2011-03-03 08:59:15 EST
Thanks for the bug report. This was fixed in the Helios SR2, which was just recently released.

*** This bug has been marked as a duplicate of bug 320001 ***