Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355700

Summary: [Protocol] Javascript error if user enters text with special characters
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 351945    

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.