Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352305 - ExitConfirmation containing quotation marks causes javascript error
Summary: ExitConfirmation containing quotation marks causes javascript error
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: sr141
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 03:11 EDT by Michael Klein CLA
Modified: 2011-08-25 08:49 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch for v1.4_Maintenance (1.62 KB, patch)
2011-07-18 05:21 EDT, Ivan Furnadjiev CLA
ivan: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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