Skip to content

Commit

Permalink
[Customer Automation Rules ]Escape Rule fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Jan 27, 2022
1 parent 8b7a45b commit 1e7a823
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Controller/Admin/RulesController.php
Expand Up @@ -48,11 +48,11 @@ public function listAction(Request $request)
$json[] = [
'iconCls' => $icon,
'id' => $rule->getId(),
'text' => $rule->getName(),
'text' => htmlspecialchars($rule->getName()),
'leaf' => true,
'qtipCfg' => [
'title' => $title,
'text' => $rule->getDescription(),
'title' => htmlspecialchars($title),
'text' => htmlspecialchars($rule->getDescription()),
],
];
}
Expand Down
8 changes: 5 additions & 3 deletions src/Resources/public/js/config/rule.js
Expand Up @@ -38,7 +38,7 @@ pimcore.plugin.cmf.config.rule = Class.create({

this.tabPanel = new Ext.TabPanel({
activeTab: 0,
title: rule.name,
title: Ext.util.Format.htmlEncode(rule.name),
closable: true,
deferredRender: false,
forceLayout: true,
Expand Down Expand Up @@ -119,14 +119,16 @@ pimcore.plugin.cmf.config.rule = Class.create({
name: "name",
fieldLabel: t("name"),
width: 350,
value: this.rule.name
value: this.rule.name,
renderer: Ext.util.Format.htmlEncode
}, {
xtype: "textarea",
name: "description",
fieldLabel: t("description"),
width: 500,
height: 100,
value: this.rule.description
value: this.rule.description,
renderer: Ext.util.Format.htmlEncode
}, {
xtype: "checkbox",
name: "active",
Expand Down

0 comments on commit 1e7a823

Please sign in to comment.