88// phpcs:disable Generic.Files.LineLength
99
1010/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer */
11+ /** @var \Magento\Framework\Escaper $escaper */
1112
1213$ _item = $ block ->getItem ();
1314$ product = $ _item ->getProduct ();
@@ -18,10 +19,10 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
1819?>
1920<tbody class="cart item">
2021 <tr class="item-info">
21- <td data-th="<?= $ block ->escapeHtml (__ ('Item ' )) ?> " class="col item">
22+ <td data-th="<?= $ escaper ->escapeHtml (__ ('Item ' )) ?> " class="col item">
2223 <?php if ($ block ->hasProductUrl ()): ?>
23- <a href="<?= $ block ->escapeUrl ($ block ->getProductUrl ()) ?> "
24- title="<?= $ block ->escapeHtml ($ block ->getProductName ()) ?> "
24+ <a href="<?= $ escaper ->escapeUrl ($ block ->getProductUrl ()) ?> "
25+ title="<?= $ escaper ->escapeHtml ($ block ->getProductName ()) ?> "
2526 tabindex="-1"
2627 class="product-item-photo">
2728 <?php else : ?>
@@ -36,30 +37,30 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
3637 <div class="product-item-details">
3738 <strong class="product-item-name">
3839 <?php if ($ block ->hasProductUrl ()): ?>
39- <a href="<?= $ block ->escapeUrl ($ block ->getProductUrl ()) ?> "><?= $ block ->escapeHtml ($ block ->getProductName ()) ?> </a>
40+ <a href="<?= $ escaper ->escapeUrl ($ block ->getProductUrl ()) ?> "><?= $ escaper ->escapeHtml ($ block ->getProductName ()) ?> </a>
4041 <?php else : ?>
41- <?= $ block ->escapeHtml ($ block ->getProductName ()) ?>
42+ <?= $ escaper ->escapeHtml ($ block ->getProductName ()) ?>
4243 <?php endif ; ?>
4344 </strong>
4445 <?php if ($ _options = $ block ->getOptionList ()): ?>
4546 <dl class="item-options">
4647 <?php foreach ($ _options as $ _option ): ?>
4748 <?php $ _formatedOptionValue = $ block ->getFormatedOptionValue ($ _option ) ?>
48- <dt><?= $ block ->escapeHtml ($ _option ['label ' ]) ?> </dt>
49+ <dt><?= $ escaper ->escapeHtml ($ _option ['label ' ]) ?> </dt>
4950 <dd>
5051 <?php if (isset ($ _formatedOptionValue ['full_view ' ])): ?>
51- <?= $ block ->escapeHtml ($ _formatedOptionValue ['full_view ' ], ['span ' , 'a ' ]) ?>
52+ <?= $ escaper ->escapeHtml ($ _formatedOptionValue ['full_view ' ], ['span ' , 'a ' ]) ?>
5253 <?php else : ?>
53- <?= $ block ->escapeHtml ($ _formatedOptionValue ['value ' ], ['span ' , 'a ' ]) ?>
54+ <?= $ escaper ->escapeHtml ($ _formatedOptionValue ['value ' ], ['span ' , 'a ' ]) ?>
5455 <?php endif ; ?>
5556 </dd>
5657 <?php endforeach ; ?>
5758 </dl>
5859 <?php endif ; ?>
5960 <?php if ($ messages = $ block ->getMessages ()): ?>
6061 <?php foreach ($ messages as $ message ): ?>
61- <div class= "cart item message <?= $ block ->escapeHtmlAttr ($ message ['type ' ]) ?> ">
62- <div><?= $ block ->escapeHtml ($ message ['text ' ]) ?> </div>
62+ <div class="cart item message <?= $ escaper ->escapeHtmlAttr ($ message ['type ' ]) ?> ">
63+ <div><?= $ escaper ->escapeHtml ($ message ['text ' ]) ?> </div>
6364 </div>
6465 <?php endforeach ; ?>
6566 <?php endif ; ?>
@@ -71,53 +72,53 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
7172 </td>
7273
7374 <?php if ($ canApplyMsrp ): ?>
74- <td class="col msrp" data-th="<?= $ block ->escapeHtml (__ ('Price ' )) ?> ">
75+ <td class="col msrp" data-th="<?= $ escaper ->escapeHtml (__ ('Price ' )) ?> ">
7576 <span class="pricing msrp">
76- <span class="msrp notice"><?= $ block ->escapeHtml (__ ('See price before order confirmation. ' )) ?> </span>
77+ <span class="msrp notice"><?= $ escaper ->escapeHtml (__ ('See price before order confirmation. ' )) ?> </span>
7778 <?php $ helpLinkId = 'cart-msrp-help- ' . $ _item ->getId (); ?>
7879 <a href="#" class="action help map"
79- id="<?= ($ block ->escapeHtmlAttr ($ helpLinkId )) ?> "
80+ id="<?= ($ escaper ->escapeHtmlAttr ($ helpLinkId )) ?> "
8081 data-mage-init='{"addToCart":{
8182 "origin": "info",
82- "helpLinkId": "#<?= $ block ->escapeJs ($ block ->escapeHtml ($ helpLinkId )) ?> ",
83- "productName": "<?= $ block ->escapeJs ($ block ->escapeHtml ($ product ->getName ())) ?> ",
83+ "helpLinkId": "#<?= $ escaper ->escapeJs ($ escaper ->escapeHtml ($ helpLinkId )) ?> ",
84+ "productName": "<?= $ escaper ->escapeJs ($ escaper ->escapeHtml ($ product ->getName ())) ?> ",
8485 "showAddToCart": false
8586 }
8687 }'
8788 >
88- <span><?= $ block ->escapeHtml (__ ("What's this? " )) ?> </span>
89+ <span><?= $ escaper ->escapeHtml (__ ("What's this? " )) ?> </span>
8990 </a>
9091 </span>
9192 </td>
9293 <?php else : ?>
93- <td class="col price" data-th="<?= $ block ->escapeHtml (__ ('Price ' )) ?> ">
94+ <td class="col price" data-th="<?= $ escaper ->escapeHtml (__ ('Price ' )) ?> ">
9495 <?= $ block ->getUnitPriceHtml ($ _item ) ?>
9596 </td>
9697 <?php endif ; ?>
97- <td class="col qty" data-th="<?= $ block ->escapeHtml (__ ('Qty ' )) ?> ">
98+ <td class="col qty" data-th="<?= $ escaper ->escapeHtml (__ ('Qty ' )) ?> ">
9899 <div class="field qty">
99100 <div class="control qty">
100- <label for="cart-<?= $ block ->escapeHtmlAttr ($ _item ->getId ()) ?> -qty">
101- <span class="label"><?= $ block ->escapeHtml (__ ('Qty ' )) ?> </span>
102- <input id="cart-<?= $ block ->escapeHtmlAttr ($ _item ->getId ()) ?> -qty"
103- name="cart[<?= $ block ->escapeHtmlAttr ($ _item ->getId ()) ?> ][qty]"
104- data-cart-item-id="<?= $ block ->escapeHtmlAttr ($ _item ->getSku ()) ?> "
105- value="<?= $ block ->escapeHtmlAttr ($ block ->getQty ()) ?> "
101+ <label for="cart-<?= $ escaper ->escapeHtmlAttr ($ _item ->getId ()) ?> -qty">
102+ <span class="label"><?= $ escaper ->escapeHtml (__ ('Qty ' )) ?> </span>
103+ <input id="cart-<?= $ escaper ->escapeHtmlAttr ($ _item ->getId ()) ?> -qty"
104+ name="cart[<?= $ escaper ->escapeHtmlAttr ($ _item ->getId ()) ?> ][qty]"
105+ data-cart-item-id="<?= $ escaper ->escapeHtmlAttr ($ _item ->getSku ()) ?> "
106+ value="<?= $ escaper ->escapeHtmlAttr ($ block ->getQty ()) ?> "
106107 type="number"
107108 min="0"
108109 size="4"
109110 step="any"
110- title="<?= $ block ->escapeHtmlAttr (__ ('Qty ' )) ?> "
111+ title="<?= $ escaper ->escapeHtmlAttr (__ ('Qty ' )) ?> "
111112 class="input-text qty"
112113 data-validate="{required:true,'validate-greater-than-zero':true}"
113- data-item-qty="<?= $ block ->escapeHtmlAttr ($ block ->getQty ()) ?> "
114+ data-item-qty="<?= $ escaper ->escapeHtmlAttr ($ block ->getQty ()) ?> "
114115 data-role="cart-item-qty"/>
115116 </label>
116117 </div>
117118 </div>
118119 </td>
119120
120- <td class="col subtotal" data-th="<?= $ block ->escapeHtml (__ ('Subtotal ' )) ?> ">
121+ <td class="col subtotal" data-th="<?= $ escaper ->escapeHtml (__ ('Subtotal ' )) ?> ">
121122 <?php if ($ canApplyMsrp ): ?>
122123 <span class="cart msrp subtotal">--</span>
123124 <?php else : ?>
0 commit comments