JS Error: missing ) after argument list

  •  08-24-2010, 3:36 AM

    JS Error: missing ) after argument list

    Cute editor produces the following error when loading the full editor in French:
    missing ) after argument list

    This is because the localisation strings are not properly escaped (' to \')

    In CuteEditorImplementation.js (all) and Loader.js you have this code:
    1. case 'imagemap':  
    2.     var img = SearchSelectionElement('IMG');  
    3.     if (!img) {  
    4.         alert('[[SelecttoCreateImageMap]]');  
    5.         return;  
    6.     } 
    In fr-FR.xml & fr-CA.xml
    1. <resource name="SelecttoCreateImageMap">Selectionner une image pour créer l'image map</resource> 
    Which produce this:
    1. case 'imagemap':  
    2.     var img = SearchSelectionElement('IMG');  
    3.     if (!img) {  
    4.         alert('Selectionner une image pour créer l'image map');  
    5.         return;  
    6.     } 
    And the unescaped apostrophe produces a JavaScript error. There are a bunch of other French translations that produce the same error, single quotes need to be escaped either in the language.xml files or wherever you replace these placeholders (I assume cuteeditor.dll).
View Complete Thread