From 2fd46859c1def6b5ab79ae2b9cb88c309769443d Mon Sep 17 00:00:00 2001 From: Divesh Pahuja Date: Fri, 19 Aug 2022 17:35:10 +0200 Subject: [PATCH] [Admin] Translations - properly escape key on roweditor --- .../Resources/public/js/pimcore/settings/translation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/AdminBundle/Resources/public/js/pimcore/settings/translation.js b/bundles/AdminBundle/Resources/public/js/pimcore/settings/translation.js index 9346032a874..52570a30b9f 100644 --- a/bundles/AdminBundle/Resources/public/js/pimcore/settings/translation.js +++ b/bundles/AdminBundle/Resources/public/js/pimcore/settings/translation.js @@ -247,7 +247,10 @@ pimcore.settings.translation.domain = Class.create({ ]; var typesColumns = [ - {text: t("key"), sortable: true, dataIndex: 'key', flex: 1, editable: false, filter: 'string'}, + {text: t("key"), sortable: true, dataIndex: 'key', flex: 1, editable: false, filter: 'string', + editor: new Ext.form.DisplayField({ + htmlEncode: true + })}, {text: t("type"), sortable: true, dataIndex: 'type', width: 100, editor: new Ext.form.ComboBox({ triggerAction: 'all', editable: false, @@ -315,7 +318,7 @@ pimcore.settings.translation.domain = Class.create({ icon: "/bundles/pimcoreadmin/img/flat-color-icons/delete.svg", handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); - pimcore.helpers.deleteConfirm(t('translation'), data.data.key, function () { + pimcore.helpers.deleteConfirm(t('translation'), Ext.util.Format.htmlEncode(data.data.key), function () { grid.getStore().removeAt(rowIndex); }.bind(this)); }.bind(this)