JS Error: missing ) after argument list

Last post 08-25-2010, 8:39 AM by Eric. 3 replies.
Sort Posts: Previous Next
  •  08-24-2010, 3:36 AM 63580

    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).
  •  08-24-2010, 10:09 AM 63586 in reply to 63580

    Re: JS Error: missing ) after argument list

    You can follow steps:
    3. Do not select any image, and click button "Add image map"
    I have checked these steps and cannot reproduce your issue. Can you tell us your operation steps?
     
    Regards,
    Eric
  •  08-25-2010, 2:13 AM 63605 in reply to 63586

    Re: JS Error: missing ) after argument list

    It looks like you have fixed this in one of the versions since I last updated ... the error was triggered on load but the apostrophe is properly escaped in the latest version.
     
    Thanks for your help.
  •  08-25-2010, 8:39 AM 63610 in reply to 63605

    Re: JS Error: missing ) after argument list

    If this issue exists in your current version, you can upgrade to latest version, download url is http://cutesoft.net/downloads/folders/cute_editor_current_releases/entry21904.aspx
     
    Regards,
    Eric
View as RSS news feed in XML