diff --git a/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js b/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js index 0b70ee7040abee94271120d73d55b8a5df93c3bf..603295ad483fb289926f00a407a999790458ae88 100644 --- a/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js +++ b/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js @@ -537,6 +537,12 @@ Vtiger.Class('Settings_LayoutEditor_Js', { for (var i in fieldOptions) { var fieldValue = fieldOptions[i]; + var specialChars = /[<\>\"\,\[\]\{\}]/; + if (specialChars.test(fieldValue)) { + var message = app.vtranslate('JS_SPECIAL_CHARACTERS') + " < > \" , [ ] { } " + app.vtranslate('JS_NOT_ALLOWED'); + vtUtils.showValidationMessage(element, message, {container:data}); + return false; + } var fieldValueOption = defaultOptions.filter('[value="'+fieldValue+'"]'); if (fieldValueOption.length <= 0) { newOptions += ' <option value="'+fieldValue+'">'+fieldValue+'</option> ';