File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
app/code/Magento/Rule/Block
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 9
9
use Magento \Framework \View \Element \AbstractBlock ;
10
10
11
11
/**
12
+ * Renderer for Editable sales rules.
13
+ *
12
14
* @api
13
15
* @since 100.0.2
14
16
*/
@@ -52,9 +54,9 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
52
54
53
55
if ($ element ->getShowAsText ()) {
54
56
$ html = ' <input type="hidden" class="hidden" id=" ' .
55
- $ element ->getHtmlId () .
57
+ $ this -> escapeHtmlAttr ( $ element ->getHtmlId () ) .
56
58
'" name=" ' .
57
- $ element ->getName () .
59
+ $ this -> escapeHtmlAttr ( $ element ->getName () ) .
58
60
'" value=" ' .
59
61
$ element ->getValue () .
60
62
'" data-form-part=" ' .
Original file line number Diff line number Diff line change @@ -170,7 +170,11 @@ public function setId($id)
170
170
*/
171
171
public function getHtmlId ()
172
172
{
173
- return $ this ->getForm ()->getHtmlIdPrefix () . $ this ->getData ('html_id ' ) . $ this ->getForm ()->getHtmlIdSuffix ();
173
+ return $ this ->_escaper ->escapeHtml (
174
+ $ this ->getForm ()->getHtmlIdPrefix () .
175
+ $ this ->getData ('html_id ' ) .
176
+ $ this ->getForm ()->getHtmlIdSuffix ()
177
+ );
174
178
}
175
179
176
180
/**
@@ -184,7 +188,7 @@ public function getName()
184
188
if ($ suffix = $ this ->getForm ()->getFieldNameSuffix ()) {
185
189
$ name = $ this ->getForm ()->addSuffixToName ($ name , $ suffix );
186
190
}
187
- return $ name ;
191
+ return $ this -> _escaper -> escapeHtml ( $ name) ;
188
192
}
189
193
190
194
/**
You can’t perform that action at this time.
0 commit comments