Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-17657

Apostrophe in the name of a class generates a javascript error

    XMLWordPrintable

Details

    Description

      Hi,

      We can't have an apostrophe in the name of a class.

      For example, if you translate the "User class group" in "Groupe d'utilisateurs", action on the "crank" sub-elements in the administration interface is broken.

      The action is in the file ":ezajaxsubitems_datatable.js

              var customMenu = function(cell, rec, column, data) {
                  var createhereMenu = (confObj.classesString != '') ? -1 : "\'child-menu-create-here\'";
                  cell.innerHTML = '<a href="#" onclick="ezpopmenu_showTopLevel(event, \'SubitemsContextMenu\', \{\'%nodeID%\':' + rec.getData('node_id') + ',\'%objectID%\':' + rec.getData('contentobject_id') + ',\'%version%\':' + rec.getData('version') + ',\'%languages%\':' + confObj.languagesString + ',\'%classList%\':' + confObj.classesString + '\ }, \'' + rec.getData('name') + '\', ' + rec.getData('node_id') + ', ' + createhereMenu + '); return false;"><div class="crankfield"></div></a>';
              }
      

      "confObj.classesString" should be escape, but this variable is directly retrieve "from kernel :

      classesString: "{$node.classes_js_array}",
      

      in children_detailed.tpl.

      I think It is used elsewhere, so I havn't idea to fix this.

      Best regards

      Steps to reproduce

      Add an apostrophe in a human classe Name

      Attachments

        Activity

          People

            unknown unknown
            2bfcc1b1-0b8e-4fb5-9c24-c434957abb69@accounts.ibexa.co Sébastien Morel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: