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

Bug 352305

Summary: ExitConfirmation containing quotation marks causes javascript error
Product: [RT] RAP Reporter: Michael Klein <michael.klein>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.4   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard: sr141
Attachments:
Description Flags
Proposed patch for v1.4_Maintenance ivan: review?

Description Michael Klein CLA 2011-07-18 03:11:22 EDT
Environment: Firefox 5.0/IE 9.0.8112 on Win7

The bug occurs using RAP 1.4 (maintenance branch) and HEAD


Steps to reproduce:
* create a plugin
* define an extension for the org.eclipse.rap.ui.branding extension point
* create an exit confirmation
* let the method getExitConfirmationText() return a string containing quotation marks
* start the RAP application
-> Javascript error occurred


Here is an exit confirmation to reproduce:

public class MyExitConfirmation implements IExitConfirmation {

    public String getExitConfirmationText() {
        return "Hello \"World\"";
    }

    public boolean showExitConfirmation() {
        return true;
    }

}
Comment 1 Ivan Furnadjiev CLA 2011-07-18 05:21:48 EDT
Created attachment 199816 [details]
Proposed patch for v1.4_Maintenance
Comment 2 Ivan Furnadjiev CLA 2011-07-18 05:23:08 EDT
Fixed in CVS HEAD by escaping double quotes in DisplayLCA#writeExitConfirmation.
Comment 3 Michael Klein CLA 2011-07-18 06:05:18 EDT
(In reply to comment #1)
The proposed patch works for me.
Thanks for the quick fix.
Comment 4 Ivan Furnadjiev CLA 2011-07-26 03:18:19 EDT
Applied patch to 1.4_Maintenance.
Comment 5 Tim Buschtoens CLA 2011-08-25 08:49:40 EDT
Commited patch to v14_Tree_Table_Merge branch