Skip to content

Commit

Permalink
escaping 'key' custom property field in elements
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored and dvesh3 committed Mar 4, 2022
1 parent ce5c01f commit e786fd4
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -568,10 +568,11 @@ pimcore.element.properties = Class.create({

addSetFromUserDefined: function (customKey, customType) {
try {
if (in_array(customKey.getValue(), this.disallowedKeys)) {
let key = htmlspecialchars(customKey.getValue());
if (in_array(key, this.disallowedKeys)) {
Ext.MessageBox.alert(t("error"), t("name_is_not_allowed"));
}
this.add(customKey.getValue(), customType.getValue(), false, false, false, true);
this.add(key, customType.getValue(), false, false, false, true);
} catch (e) {
console.log(e);
}
Expand Down

0 comments on commit e786fd4

Please sign in to comment.