Skip to content

Commit 919449b

Browse files
author
Stanislav Idolov
authored
ENGCOM-1991: Replaced @escapeNotVerified annotations #16091
2 parents fdf67e7 + 1197398 commit 919449b

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,36 @@
1414
?>
1515

1616
<?php if ($_item = $block->getItem()): ?>
17-
<div id="order_item_<?= /* @escapeNotVerified */ $_item->getId() ?>_title"
17+
<div id="order_item_<?= $block->escapeHtml($_item->getId()) ?>_title"
1818
class="product-title">
1919
<?= $block->escapeHtml($_item->getName()) ?>
2020
</div>
21-
2221
<div class="product-sku-block">
23-
<span><?= /* @escapeNotVerified */ __('SKU') ?>:</span> <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($block->getSku()))) ?>
22+
<span><?= $block->escapeHtml(__('SKU'))?>:</span> <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($block->getSku()))) ?>
2423
</div>
2524

2625
<?php if ($block->getOrderOptions()): ?>
2726
<dl class="item-options">
2827
<?php foreach ($block->getOrderOptions() as $_option): ?>
29-
<dt><?= /* @escapeNotVerified */ $_option['label'] ?>:</dt>
28+
<dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
3029
<dd>
3130
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
32-
<?= /* @escapeNotVerified */ $block->getCustomizedOptionValue($_option) ?>
31+
<?= $block->escapeHtml($block->getCustomizedOptionValue($_option)) ?>
3332
<?php else: ?>
3433
<?php $_option = $block->getFormattedOption($_option['value']); ?>
35-
<?= /* @escapeNotVerified */ $_option['value'] ?><?php if (isset($_option['remainder']) && $_option['remainder']): ?><span id="<?= /* @escapeNotVerified */ $_dots = 'dots' . uniqid() ?>"> ...</span><span id="<?= /* @escapeNotVerified */ $_id = 'id' . uniqid() ?>"><?= /* @escapeNotVerified */ $_option['remainder'] ?></span>
34+
<?= $block->escapeHtml($_option['value']) ?>
35+
<?php if (isset($_option['remainder']) && $_option['remainder']): ?>
36+
<?php $dots = 'dots' . uniqid(); ?>
37+
<span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
38+
<?php $id = 'id' . uniqid(); ?>
39+
<span id="<?= /* @noEscape */ $id; ?>"><?= $block->escapeHtml($_option['remainder']) ?></span>
3640
<script>
37-
require(['prototype'], function() {
38-
$('<?= /* @escapeNotVerified */ $_id ?>').hide();
39-
$('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_id ?>').show();});
40-
$('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_dots ?>').hide();});
41-
$('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_id ?>').hide();});
42-
$('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_dots ?>').show();});
41+
require(['prototype'], function(){
42+
$('<?= /* @noEscape */ $id; ?>').hide();
43+
$('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $id; ?>').show();});
44+
$('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $dots; ?>').hide();});
45+
$('<?= /* @noEscape */ $id; ?>').up().observe('mouseout', function(){$('<?= /* @noEscape */ $id; ?>').hide();});
46+
$('<?= /* @noEscape */ $id; ?>').up().observe('mouseout', function(){$('<?= /* @noEscape */ $dots; ?>').show();});
4347
});
4448
</script>
4549
<?php endif; ?>

app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,38 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<?php if ($_item = $block->getItem()): ?>
10+
<?php if ($item = $block->getItem()): ?>
1111
<table class="qty-table">
1212
<tr>
13-
<th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
14-
<td><?= /* @escapeNotVerified */ $_item->getQtyOrdered()*1 ?></td>
13+
<th><?= $block->escapeHtml(__('Ordered')); ?></th>
14+
<td><?= /* @noEscape */ $item->getQtyOrdered()*1 ?></td>
1515
</tr>
1616

17-
<?php if ((float) $_item->getQtyInvoiced()): ?>
17+
<?php if ((float) $item->getQtyInvoiced()): ?>
1818
<tr>
19-
<th><?= /* @escapeNotVerified */ __('Invoiced') ?></th>
20-
<td><?= /* @escapeNotVerified */ $_item->getQtyInvoiced()*1 ?></td>
19+
<th><?= $block->escapeHtml(__('Invoiced')); ?></th>
20+
<td><?= /* @noEscape */ $item->getQtyInvoiced()*1 ?></td>
2121
</tr>
2222
<?php endif; ?>
2323

24-
<?php if ((float) $_item->getQtyShipped()): ?>
24+
<?php if ((float) $item->getQtyShipped()): ?>
2525
<tr>
26-
<th><?= /* @escapeNotVerified */ __('Shipped') ?></th>
27-
<td><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></td>
26+
<th><?= $block->escapeHtml(__('Shipped')); ?></th>
27+
<td><?= /* @noEscape */ $item->getQtyShipped()*1 ?></td>
2828
</tr>
2929
<?php endif; ?>
3030

31-
<?php if ((float) $_item->getQtyRefunded()): ?>
31+
<?php if ((float) $item->getQtyRefunded()): ?>
3232
<tr>
33-
<th><?= /* @escapeNotVerified */ __('Refunded') ?></th>
34-
<td><?= /* @escapeNotVerified */ $_item->getQtyRefunded()*1 ?></td>
33+
<th><?= $block->escapeHtml(__('Refunded')); ?></th>
34+
<td><?= /* @noEscape */ $item->getQtyRefunded()*1 ?></td>
3535
</tr>
3636
<?php endif; ?>
3737

38-
<?php if ((float) $_item->getQtyCanceled()): ?>
38+
<?php if ((float) $item->getQtyCanceled()): ?>
3939
<tr>
40-
<th><?= /* @escapeNotVerified */ __('Canceled') ?></th>
41-
<td><?= /* @escapeNotVerified */ $_item->getQtyCanceled()*1 ?></td>
40+
<th><?= $block->escapeHtml(__('Canceled')); ?></th>
41+
<td><?= /* @noEscape */ $item->getQtyCanceled()*1 ?></td>
4242
</tr>
4343
<?php endif; ?>
4444

0 commit comments

Comments
 (0)