Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
4.4.0
-
None
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