Skip to content

Commit c1acc6a

Browse files
author
Joan He
committed
MAGETWO-99282: Eliminate @escapeNotVerified in Magento_Catalog module
1 parent 2e85cdc commit c1acc6a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

app/code/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getGalleryImages()
114114
*/
115115
public function getMagnifier()
116116
{
117-
return $this->jsonEncoder->encode($this->escapeJs($this->getVar('magnifier')));
117+
return $this->jsonEncoder->encode($this->getVar('magnifier'));
118118
}
119119

120120
/**

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<input class="input-text<?php if ($_store->getId() == \Magento\Store\Model\Store::DEFAULT_STORE_ID) :?> required-option<?php endif; ?>"
3333
type="text"
3434
name="frontend_label[<?= $block->escapeHtmlAttr($_store->getId()) ?>]"
35-
value="<?= $block->escapeHtml($_labels[$_store->getId()]) ?>"
35+
value="<?= $block->escapeHtmlAttr($_labels[$_store->getId()]) ?>"
3636
<?php if ($block->getReadOnly()) :?>
3737
disabled="disabled"
3838
<?php endif;?>/>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@
279279

280280
addGroup : function() {
281281
prompt({
282-
title: "<?= $block->escapeJs(__('Add New Group')) ?>",
283-
content: "<?= $block->escapeJs(__('Please enter a new group name.')) ?>",
282+
title: "<?= $block->escapeJs($block->escapeHtml(__('Add New Group'))) ?>",
283+
content: "<?= $block->escapeJs($block->escapeHtml(__('Please enter a new group name.'))) ?>",
284284
value: "",
285285
validation: true,
286286
validationRules: ['required-entry'],

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var tierPriceRowTemplate = '<tr>'
7070
+ '<input class="<?= $block->escapeHtmlAttr($_htmlClass) ?> qty required-entry validate-greater-than-zero" type="text" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][price_qty]" value="<%- data.qty %>" id="tier_price_row_<%- data.index %>_qty" />'
7171
+ '<span><?= $block->escapeHtml(__("and above")) ?></span>'
7272
+ '</td>'
73-
+ '<td class="col-price"><input class="<?= $block->escapeHtmlAttr($_htmlClass) ?> required-entry <?= /* @noEscape */ $_priceValueValidation ?>" type="text" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][price]" value="<%- data.price %>" id="tier_price_row_<%- data.index %>_price" /></td>'
73+
+ '<td class="col-price"><input class="<?= $block->escapeHtmlAttr($_htmlClass) ?> required-entry <?= $block->escapeHtmlAttr($_priceValueValidation) ?>" type="text" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][price]" value="<%- data.price %>" id="tier_price_row_<%- data.index %>_price" /></td>'
7474
+ '<td class="col-delete"><input type="hidden" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][delete]" class="delete" value="" id="tier_price_row_<%- data.index %>_delete" />'
7575
+ '<button title="<?= $block->escapeHtml(__('Delete Tier')) ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="tier_price_row_<%- data.index %>_delete_button" onclick="return tierPriceControl.deleteItem(event);">'
7676
+ '<span><?= $block->escapeHtml(__("Delete")) ?></span></button></td>'

app/code/Magento/Catalog/view/frontend/templates/product/list.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
7575
<?= $block->getProductDetailsHtml($_product) ?>
7676

7777
<div class="product-item-inner">
78-
<div class="product actions product-item-actions"<?= /* @noEscape */ strpos($pos, $viewMode . '-actions') ? $position : '' ?>>
79-
<div class="actions-primary"<?= /* @noEscape */ strpos($pos, $viewMode . '-primary') ? $position : '' ?>>
78+
<div class="product actions product-item-actions"<?= strpos($pos, $viewMode . '-actions') ? $block->escapeHtmlAttr($position) : '' ?>>
79+
<div class="actions-primary"<?= strpos($pos, $viewMode . '-primary') ? $block->escapeHtmlAttr($position) : '' ?>>
8080
<?php if ($_product->isSaleable()) :?>
8181
<?php $postParams = $block->getAddToCartPostParams($_product); ?>
8282
<form data-role="tocart-form"
@@ -103,7 +103,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
103103
<?php endif; ?>
104104
<?php endif; ?>
105105
</div>
106-
<div data-role="add-to-links" class="actions-secondary"<?= /* @noEscape */ strpos($pos, $viewMode . '-secondary') ? $position : '' ?>>
106+
<div data-role="add-to-links" class="actions-secondary"<?= strpos($pos, $viewMode . '-secondary') ? $block->escapeHtmlAttr($position) : '' ?>>
107107
<?php if ($addToBlock = $block->getChildBlock('addto')) :?>
108108
<?= $addToBlock->setProduct($_product)->getChildHtml() ?>
109109
<?php endif; ?>
@@ -130,7 +130,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
130130
{
131131
"[data-role=tocart-form], .form.map.checkout": {
132132
"catalogAddToCart": {
133-
"product_sku": "<?= /* @noEscape */ $_product->getSku() ?>"
133+
"product_sku": "<?= $block->escapeJs($_product->getSku()) ?>"
134134
}
135135
}
136136
}

0 commit comments

Comments
 (0)