Skip to content

Commit 12619b2

Browse files
committed
MC-18467: [Incorrect Escaping] Add proper escaping to translation phrases marked with @NoEscape tag
1 parent be89e9c commit 12619b2

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $options = $block->decorateArray($block->getOptions($stripSelection));
2626
</script>
2727
<fieldset class="fieldset fieldset-bundle-options">
2828
<legend id="customizeTitle" class="legend title">
29-
<span><?=/* @noEscape */ __('Customize %1', $helper->productAttribute($product, $product->getName(), 'name')) ?></span>
29+
<span><?= $block->escapeHtml(__('Customize %1', $helper->productAttribute($product, $product->getName(), 'name'))) ?></span>
3030
</legend><br />
3131
<?= $block->getChildHtml('product_info_bundle_options_top') ?>
3232
<?php foreach ($options as $option) : ?>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
id="product-gallery-image"
3838
class="image"
3939
data-mage-init='{"catalogGallery":{}}'/>
40-
<div class="buttons-set"><a href="#" class="button" role="close-window"><span><?= /* @noEscape */ __('Close Window') ?></span></a></div>
40+
<div class="buttons-set"><a href="#" class="button" role="close-window"><span><?= $block->escapeHtml(__('Close Window')) ?></span></a></div>
4141
<?php if ($block->getPreviousImageUrl() || $block->getNextImageUrl()) :?>
4242
<div class="nav">
4343
<?php if ($_prevUrl = $block->getPreviousImageUrl()) :?>

app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' +
208208
<input type="checkbox" data-action="change-type-product-downloadable" class="admin__control-checkbox"
209209
name="is_downloadable" id="is-downloaodable" <?= $block->isDownloadable() ? 'checked="checked"' : ''?> />
210210
<label class="admin__field-label" for="is-downloaodable">
211-
<span><?= /* @noEscape */ __('Is this a downloadable Product?'); ?></span>
211+
<span><?= $block->escapeHtml(__('Is this a downloadable Product?')); ?></span>
212212
</label>
213213
</div>
214214
<div class="entry-edit" id="product_info_tabs_downloadable_items">

app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $block->getConfigJson();
4949
</table>
5050
</div>
5151
<div class="admin__field-note">
52-
<?= /* @noEscape */ __('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.') ?>
52+
<?= $block->escapeHtml(__('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')) ?>
5353
</div>
5454
</div>
5555
</div>

app/code/Magento/Vault/view/frontend/templates/cards_list.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ $tokens = $block->getPaymentTokens();
1111
<?php if (count($tokens) !== 0): ?>
1212
<div class="table-wrapper my-credit-cards">
1313
<table class="data table table-credit-cards" id="my-orders-table">
14-
<caption class="table-caption"><?= /* @noEscape */ __('Stored Payment Methods') ?></caption>
14+
<caption class="table-caption"><?= $block->escapeHtml(__('Stored Payment Methods')) ?></caption>
1515
<thead>
1616
<tr>
17-
<th scope="col" class="col card-number"><?= /* @noEscape */ __('Card Number') ?></th>
18-
<th scope="col" class="col expire"><?= /* @noEscape */ __('Expiration Date') ?></th>
19-
<th scope="col" class="col card-type"><?= /* @noEscape */ __('Type') ?></th>
17+
<th scope="col" class="col card-number"><?= $block->escapeHtml(__('Card Number')) ?></th>
18+
<th scope="col" class="col expire"><?= $block->escapeHtml(__('Expiration Date')) ?></th>
19+
<th scope="col" class="col card-type"><?= $block->escapeHtml(__('Type')) ?></th>
2020
<th scope="col" class="col actions">&nbsp;</th>
2121
</tr>
2222
</thead>
@@ -31,5 +31,5 @@ $tokens = $block->getPaymentTokens();
3131
</div>
3232

3333
<?php elseif (!$block->isExistsCustomerTokens()): ?>
34-
<div class="message info empty"><span><?= /* @noEscape */ __('You have no stored payment methods.') ?></span></div>
34+
<div class="message info empty"><span><?= $block->escapeHtml(__('You have no stored payment methods.')) ?></span></div>
3535
<?php endif ?>

0 commit comments

Comments
 (0)