Skip to content

Commit 009142c

Browse files
committed
MAGETWO-99488: Eliminate @escapeNotVerified in Tax-related Modules
1 parent f2446ba commit 009142c

File tree

16 files changed

+46
-46
lines changed

16 files changed

+46
-46
lines changed

app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $_item = $block->getItem();
2222
<?php if ($block->displayBothPrices() || $block->displayPriceInclTax()) : ?>
2323
<div class="price-incl-tax">
2424
<?php if ($block->displayBothPrices()) : ?>
25-
<span class="label"><?= $block->escapeHtml(('Incl. Tax')) ?>:</span>
25+
<span class="label"><?= $block->escapeHtml(__('Incl. Tax')) ?>:</span>
2626
<?php endif; ?>
2727
<?php $_incl = $this->helper(\Magento\Checkout\Helper\Data::class)->getSubtotalInclTax($_item); ?>
2828
<?php $_baseIncl = $this->helper(\Magento\Checkout\Helper\Data::class)->getBaseSubtotalInclTax($_item); ?>

app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<input
1616
class="admin__control-text<?php if ($_store->getId() == 0) : ?> required-entry<?php endif; ?>"
1717
type="text"
18-
name="title[<?= (int)$_store->getId() ?>]"
19-
value="<?= $block->escapeHtmlAttr($_labels[$_store->getId()]) ?>" />
18+
name="title[<?= (int) $_store->getId() ?>]"
19+
value="<?= $block->escapeHtmlAttr($_labels[(int) $_store->getId()]) ?>" />
2020
</div>
2121
</div>
2222
<?php endforeach; ?>

app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ require([
113113
toggleAddButton:false,
114114
addText: '<?= $block->escapeJs($block->escapeHtml(__('Add New Tax Rate'))) ?>',
115115
parse: null,
116-
nextPageUrl: '<?= $block->escapeHtml($block->getTaxRatesPageUrl())?>',
116+
nextPageUrl: '<?= $block->escapeHtml($block->getTaxRatesPageUrl()) ?>',
117117
selectedValues: this.settings.selected_values,
118118
mselectInputSubmitCallback: function (value, options) {
119119
var select = $('#tax_rate');

app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"mage/mage"
1313
], function($){
1414

15-
$('#<?= $block->escapeHtml($form->getForm()->getId()) ?>').mage('form').mage('validation');
15+
$('#<?= $block->escapeJs($form->getForm()->getId()) ?>').mage('form').mage('validation');
1616

1717
$(document).ready(function () {
1818
'use strict';

app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<?php elseif ($block->displayBothPrices()) : ?>
1414
<?= /* @noEscape */ $block->getDisplayAmount() ?>
1515
<?php if ($block->getDisplayAmountExclTax() !== $block->getDisplayAmount()) : ?>
16-
(+<?= /* @noEscape */ $block->getDisplayAmountExclTax() ?> <?= $block->escapeHtml(__('Excl. Tax'))?>)
16+
(+<?= /* @noEscape */ $block->getDisplayAmountExclTax() ?> <?= $block->escapeHtml(__('Excl. Tax')) ?>)
1717
<?php endif; ?>
1818
<?php endif; ?>

app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
?>
1313
<?php
1414
$style = $block->escapeHtmlAttr($block->getStyle());
15-
$colspan = (int)$block->getColspan();
15+
$colspan = (int) $block->getColspan();
1616
?>
1717
<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0) : ?>
1818
<tr class="grand totals excl">
@@ -41,4 +41,4 @@ $colspan = (int)$block->getColspan();
4141
<strong><?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?></strong>
4242
</td>
4343
</tr>
44-
<?php endif;?>
44+
<?php endif; ?>

app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php if ($block->displayShipping()) : ?>
1515
<?php
1616
$style = $block->escapeHtmlAttr($block->getStyle());
17-
$colspan = (int)$block->getColspan();
17+
$colspan = (int) $block->getColspan();
1818
?>
1919
<?php if ($block->displayBoth()) : ?>
2020
<tr class="totals shipping excl">
@@ -42,7 +42,7 @@
4242
<?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?>
4343
</td>
4444
</tr>
45-
<?php else :?>
45+
<?php else : ?>
4646
<tr class="totals shipping excl">
4747
<th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
4848
<?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
@@ -51,5 +51,5 @@
5151
<?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
5252
</td>
5353
</tr>
54-
<?php endif;?>
54+
<?php endif; ?>
5555
<?php endif; ?>

app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
?>
1414
<?php
1515
$style = $block->escapeHtmlAttr($block->getStyle());
16-
$colspan = (int)$block->getColspan();
16+
$colspan = (int) $block->getColspan();
1717
?>
1818
<?php if ($block->displayBoth()) : ?>
1919
<tr class="totals sub excl">
@@ -41,4 +41,4 @@ $colspan = (int)$block->getColspan();
4141
<?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?>
4242
</td>
4343
</tr>
44-
<?php endif;?>
44+
<?php endif; ?>

app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_va
2323
?>
2424

2525
<tr <?= /* @noEscape */ $attributes ?>>
26-
<th style="<?= /* @noEscape */ $_style ?>" class="mark" colspan="<?= (int)$block->getColspan() ?>" scope="row">
26+
<th style="<?= /* @noEscape */ $_style ?>" class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
2727
<?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
2828
<span class="detailed"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></span>
2929
<?php else : ?>
3030
<?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
31-
<?php endif;?>
31+
<?php endif; ?>
3232
</th>
3333
<td style="<?= /* @noEscape */ $_style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
3434
<?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_value) ?>
@@ -45,20 +45,20 @@ if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_va
4545

4646
<?php foreach ($rates as $rate) : ?>
4747
<tr class="totals-tax-details">
48-
<th class="mark" style="<?= /* @noEscape */ $_style ?>" colspan="<?= (int)$block->getColspan() ?>" scope="row">
48+
<th class="mark" style="<?= /* @noEscape */ $_style ?>" colspan="<?= (int) $block->getColspan() ?>" scope="row">
4949
<?= $block->escapeHtml($rate['title']) ?>
5050
<?php if ($rate['percent'] !== null) : ?>
51-
(<?= (float)$rate['percent'] ?>%)
51+
(<?= (float) $rate['percent'] ?>%)
5252
<?php endif; ?>
5353
</th>
5454
<?php if ($isFirst) : ?>
5555
<td style="<?= /* @noEscape */ $_style ?>" class="amount" rowspan="<?= count($rates) ?>"
56-
data-th="<?= $block->escapeHtmlAttr($rate['title']) ?><?php if ($rate['percent'] !== null) : ?>(<?= (float)$rate['percent'] ?>%)<?php endif; ?>">
56+
data-th="<?= $block->escapeHtmlAttr($rate['title']) ?><?php if ($rate['percent'] !== null) : ?>(<?= (float) $rate['percent'] ?>%)<?php endif; ?>">
5757
<?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($amount) ?>
5858
</td>
5959
<?php endif; ?>
6060
</tr>
6161
<?php $isFirst = 0; ?>
6262
<?php endforeach; ?>
6363
<?php endforeach; ?>
64-
<?php endif;?>
64+
<?php endif; ?>

app/code/Magento/Tax/view/frontend/templates/order/tax.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<td <?= /* @noEscape */ $block->getLabelProperties() ?>>
2525
<?= $block->escapeHtml($title) ?>
2626
<?php if ($percent !== null) : ?>
27-
(<?= (float)$percent ?>%)
27+
(<?= (float) $percent ?>%)
2828
<?php endif; ?>
2929
<br />
3030
</td>
@@ -33,7 +33,7 @@
3333
</td>
3434
</tr>
3535
<?php endforeach; ?>
36-
<?php endif;?>
36+
<?php endif; ?>
3737

3838
<?php if ($block->displayFullSummary() && $_fullInfo && !$block->getIsPlaneMode()) : ?>
3939
<tr class="totals-tax-summary">
@@ -47,7 +47,7 @@
4747
<div class="detailed"><?= $block->escapeHtml(__('Tax')) ?></div>
4848
<?php else : ?>
4949
<?= $block->escapeHtml(__('Tax')) ?>
50-
<?php endif;?>
50+
<?php endif; ?>
5151
</th>
5252
<td <?= /* @noEscape */ $block->getValueProperties() ?> data-th="<?= $block->escapeHtmlAttr(__('Tax')) ?>">
5353
<?= /* @noEscape */ $_order->formatPrice($_source->getTaxAmount()) ?>

0 commit comments

Comments
 (0)