Skip to content

Commit 92692df

Browse files
committed
MC-16608: Eliminate @escapeNotVerified in Backend-related Modules
- Resolve CR comments
1 parent 9873b68 commit 92692df

File tree

8 files changed

+33
-33
lines changed

8 files changed

+33
-33
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
<?php if ($block->getCriticalCount()) : ?>
2828
<div class="message message-warning error">
2929
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
30-
<?= $block->escapeHtml($block->getCriticalCount()) ?>
30+
<?= (int) $block->getCriticalCount() ?>
3131
</a>
3232
</div>
3333
<?php endif; ?>
3434

3535
<?php if ($block->getMajorCount()) : ?>
3636
<div class="message message-warning warning">
3737
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
38-
<?= $block->escapeHtml($block->getMajorCount()) ?>
38+
<?= (int) $block->getMajorCount() ?>
3939
</a>
4040
</div>
4141
<?php endif; ?>

app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ $rating = 'short';
3333
<?= $block->escapeHtml($item->getName()) ?></a>
3434
</strong>
3535

36-
<?= $block->escapeHtml($block->getProductPriceHtml(
36+
<?= /* @noEscape */ $block->getProductPriceHtml(
3737
$item,
3838
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
3939
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
4040
[
4141
'price_id_suffix' => '-' . $type
4242
]
43-
)) ?>
43+
) ?>
4444

4545
<?php if ($rating) : ?>
4646
<?= $block->getReviewsSummaryHtml($item, $rating) ?>
@@ -58,7 +58,7 @@ $rating = 'short';
5858
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($item), ['product' => $item->getEntityId()])
5959
?>
6060
<button class="action tocart"
61-
data-post='<?= $block->escapeHtmlAttr($postData) ?>'
61+
data-post='<?= /* @noEscape */ $postData ?>'
6262
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
6363
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
6464
</button>
@@ -74,7 +74,7 @@ $rating = 'short';
7474

7575
<div class="secondary-addto-links" data-role="add-to-links">
7676
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
77-
<a href="#" data-post='<?= $block->escapeHtmlAttr($block->getAddToWishlistParams($item)) ?>' class="action towishlist" data-action="add-to-wishlist" title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
77+
<a href="#" data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($item) ?>' class="action towishlist" data-action="add-to-wishlist" title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
7878
<span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
7979
</a>
8080
<?php endif; ?>
@@ -83,7 +83,7 @@ $rating = 'short';
8383
$compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
8484
?>
8585
<a href="#" class="action tocompare"
86-
data-post='<?= $block->escapeHtmlAttr($compareHelper->getPostDataParams($item)) ?>'
86+
data-post='<?= /* @noEscape */ $compareHelper->getPostDataParams($item) ?>'
8787
data-role="add-to-links"
8888
title="<?= $block->escapeHtmlAttr(__('Add to Compare')) ?>">
8989
<span><?= $block->escapeHtml(__('Add to Compare')) ?></span>

app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ if ($exist = $block->getRecentlyComparedProducts()) {
5353
<?= $block->escapeHtml($this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name')) ?>
5454
</a>
5555
</strong>
56-
<?= $block->escapeHtml($block->getProductPriceHtml(
56+
<?= /* @noEscape */ $block->getProductPriceHtml(
5757
$_product,
5858
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
5959
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
6060
[
6161
'price_id_suffix' => '-widget-compared-' . $suffix
6262
]
63-
)) ?>
63+
) ?>
6464
<div class="product-item-actions">
6565
<?php if ($_product->isSaleable()) : ?>
6666
<div class="actions-primary">
@@ -76,7 +76,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
7676
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()])
7777
?>
7878
<button class="action tocart primary"
79-
data-post='<?= $block->escapeHtmlAttr($postData) ?>'
79+
data-post='<?= /* @noEscape */ $postData ?>'
8080
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
8181
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
8282
</button>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ if ($exist = $block->getRecentlyComparedProducts()) {
5353
<?= $block->escapeHtml($_item->getName()) ?>
5454
</a>
5555
</strong>
56-
<?= $block->escapeHtml($block->getProductPriceHtml(
56+
<?= /* @noEscape */ $block->getProductPriceHtml(
5757
$_item,
5858
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
5959
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
6060
[
6161
'price_id_suffix' => '-' . $type
6262
]
63-
)) ?>
63+
) ?>
6464
<?php if ($rating) : ?>
6565
<?= $block->getReviewsSummaryHtml($_item, $rating) ?>
6666
<?php endif; ?>
@@ -81,7 +81,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
8181
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
8282
?>
8383
<button class="action tocart primary"
84-
data-post='<?= $block->escapeHtmlAttr(postData) ?>'
84+
data-post='<?= /* @noEscape */ $postData ?>'
8585
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
8686
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
8787
</button>
@@ -100,7 +100,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
100100
<div class="actions-secondary" data-role="add-to-links">
101101
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist) : ?>
102102
<a href="#"
103-
data-post='<?= $block->escapeHtmlAttr($block->getAddToWishlistParams($_item)) ?>'
103+
data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($_item) ?>'
104104
data-action="add-to-wishlist"
105105
class="action towishlist"
106106
title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
@@ -110,7 +110,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
110110
<?php if ($block->getAddToCompareUrl() && $showCompare) : ?>
111111
<?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); ?>
112112
<a href="#" class="action tocompare"
113-
data-post='<?= $block->escapeHtmlAttr($compareHelper->getPostDataParams($_item)) ?>'
113+
data-post='<?= /* @noEscape */ $compareHelper->getPostDataParams($_item) ?>'
114114
title="<?= $block->escapeHtmlAttr(__('Add to Compare')) ?>">
115115
<span><?= $block->escapeHtml(__('Add to Compare')) ?></span>
116116
</a>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ if ($exist = $block->getRecentlyComparedProducts()) {
5454
<?= $block->escapeHtml($_item->getName()) ?>
5555
</a>
5656
</strong>
57-
<?= $block->escapeHtml($block->getProductPriceHtml(
57+
<?= /* @noEscape */ $block->getProductPriceHtml(
5858
$_item,
5959
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
6060
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
6161
[
6262
'price_id_suffix' => '-' . $type
6363
]
64-
)) ?>
64+
) ?>
6565
<?php if ($rating) : ?>
6666
<?= $block->getReviewsSummaryHtml($_item, $rating) ?>
6767
<?php endif; ?>
@@ -82,7 +82,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
8282
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
8383
?>
8484
<button class="action tocart primary"
85-
data-post='<?= $block->escapeHtmlAttr($postData) ?>'
85+
data-post='<?= /* @noEscape */ $postData ?>'
8686
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
8787
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
8888
</button>
@@ -101,7 +101,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
101101
<div class="actions-secondary" data-role="add-to-links">
102102
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist) : ?>
103103
<a href="#"
104-
data-post='<?= $block->escapeHtmlAttr($block->getAddToWishlistParams($_item)) ?>'
104+
data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($_item) ?>'
105105
data-action="add-to-wishlist"
106106
class="action towishlist"
107107
title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
@@ -111,7 +111,7 @@ if ($exist = $block->getRecentlyComparedProducts()) {
111111
<?php if ($block->getAddToCompareUrl() && $showCompare) : ?>
112112
<?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
113113
<a href="#" class="action tocompare"
114-
data-post='<?= $block->escapeHtmlAttr($compareHelper->getPostDataParams($_item)) ?>'
114+
data-post='<?= /* @noEscape */ $compareHelper->getPostDataParams($_item) ?>'
115115
title="<?= $block->escapeHtmlAttr(__('Add to Compare')) ?>">
116116
<span><?= $block->escapeHtml(__('Add to Compare')) ?></span>
117117
</a>

app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
5757
<?= $block->escapeHtml($this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name')) ?>
5858
</a>
5959
</strong>
60-
<?= $block->escapeHtml($block->getProductPriceHtml(
60+
<?= /* @noEscape */ $block->getProductPriceHtml(
6161
$_product,
6262
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
6363
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
6464
[
6565
'price_id_suffix' => '-widget-viewed-' . $suffix
6666
]
67-
)) ?>
67+
) ?>
6868
<div class="product-item-actions">
6969
<?php if ($_product->isSaleable()) : ?>
7070
<div class="actions-primary">
@@ -79,7 +79,7 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
7979
$postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
8080
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]);
8181
?>
82-
<button type="button" class="action tocart primary" data-post='<?= $block->escapeHtmlAttr($postData) ?>'>
82+
<button type="button" class="action tocart primary" data-post='<?= /* @noEscape */ $postData ?>'>
8383
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
8484
</button>
8585
<?php endif; ?>

app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
5656
<?= $block->escapeHtml($_item->getName()) ?>
5757
</a>
5858
</strong>
59-
<?= $block->escapeHtml($block->getProductPriceHtml(
59+
<?= /* @noEscape */ $block->getProductPriceHtml(
6060
$_item,
6161
\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
6262
\Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
6363
[
6464
'price_id_suffix' => '-' . $type
6565
]
66-
)) ?>
66+
) ?>
6767
<?php if ($rating) : ?>
6868
<?= $block->getReviewsSummaryHtml($_item, $rating) ?>
6969
<?php endif; ?>
@@ -84,7 +84,7 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
8484
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
8585
?>
8686
<button class="action tocart primary"
87-
data-post='<?= $block->escapeHtmlAttr($postData) ?>'
87+
data-post='<?= /* @noEscape */ $postData ?>'
8888
type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
8989
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
9090
</button>
@@ -103,15 +103,15 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
103103
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist) : ?>
104104
<a href="#"
105105
class="action towishlist" data-action="add-to-wishlist"
106-
data-post='<?= $block->escapeHtmlAttr($block->getAddToWishlistParams($_item)) ?>'
106+
data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($_item) ?>'
107107
title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
108108
<span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
109109
</a>
110110
<?php endif; ?>
111111
<?php if ($block->getAddToCompareUrl() && $showCompare) : ?>
112112
<?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
113113
<a href="#" class="action tocompare"
114-
data-post='<?= $block->escapeHtmlAttr($compareHelper->getPostDataParams($_item)) ?>'
114+
data-post='<?= /* @noEscape */ $compareHelper->getPostDataParams($_item) ?>'
115115
title="<?= $block->escapeHtmlAttr(__('Add to Compare')) ?>">
116116
<span><?= $block->escapeHtml(__('Add to Compare')) ?></span>
117117
</a>

0 commit comments

Comments
 (0)