Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355700 - [Protocol] Javascript error if user enters text with special characters
Summary: [Protocol] Javascript error if user enters text with special characters
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351945
  Show dependency tree
 
Reported: 2011-08-24 09:41 EDT by Ivan Furnadjiev CLA
Modified: 2011-08-24 11:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2011-08-24 09:41:55 EDT
With migration of some widgets to the protocol, bug 304364 resurfaced again - currently valid for Shell and Label. The code:
clientObject.setProperty( "text", text + "\u2028" );
leads to an error:
Error: SyntaxError: Unexpected token ILLEGAL
Characters \u2028 and \u2029 characters should be escaped on the server-side.
Comment 1 Tim Buschtoens CLA 2011-08-24 11:25:43 EDT
Fixed in CVS HEAD. The characters are now escaped to the \uxxxx notation on the server. The client does not touch them anymore, they are unescaped when they are put into the html, which seems to be no problem for any browser.