Skip to content

Commit 7a1014b

Browse files
committed
MC-16608: Use escaper methods
- clean up code
1 parent 78a756c commit 7a1014b

File tree

2 files changed

+2
-2
lines changed
  • app/code/Magento

2 files changed

+2
-2
lines changed

app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
122122
// add existing rows
123123
<?php
124124
foreach ($block->getArrayRows() as $_rowId => $_row) {
125-
echo /* @noEscape */ "arrayRow{$block->escapeJs($_htmlId)}.add(" . /* @noEscape */ $_row->toJson() . ");\n";
125+
echo /** @noEscape */ "arrayRow{$block->escapeJs($_htmlId)}.add(" . /** @noEscape */ $_row->toJson() . ");\n";
126126
}
127127
?>
128128

app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
7272
<?php if ($_item->isSaleable()) : ?>
7373
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)) : ?>
7474
<button class="action tocart primary"
75-
data-mage-init='{"redirectUrl": {"url": "<?= $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}'
75+
data-mage-init='{"redirectUrl": {"url": "<?= $block->escapeHtmlAttr($block->escapeUrl($block->getAddToCartUrl($_item))) ?>"}}'
7676
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
7777
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
7878
</button>

0 commit comments

Comments
 (0)