Skip to content

Commit 4f5da9b

Browse files
author
OlgaVasyltsun
committed
MC-17865: Finalize @codingStandardsIgnoreFile elimination in CE
1 parent 14f6c2d commit 4f5da9b

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
$filters = $block->getConfig()->getFilters() ?? [];
1010
$allowedExtensions = [];
11+
$blockHtmlId = $block->escapeHtml($block->getHtmlId());
1112

1213
foreach ($filters as $media_type) {
1314
$allowedExtensions = array_merge($allowedExtensions, array_map(function ($fileExt) {
@@ -24,13 +25,13 @@ $resizeConfig = $block->getImageUploadConfigData()->getIsResizeEnabled()
2425
: "{action: 'resize'}";
2526
?>
2627

27-
<div id="<?= $block->getHtmlId() ?>" class="uploader">
28+
<div id="<?= /* @noEscape */ $blockHtmlId ?>" class="uploader">
2829
<span class="fileinput-button form-buttons">
2930
<span><?= $block->escapeHtml(__('Upload Images')) ?></span>
3031
<input class="fileupload" type="file" name="<?= $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>" data-url="<?= $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple>
3132
</span>
3233
<div class="clear"></div>
33-
<script type="text/x-magento-template" id="<?= $block->getHtmlId() ?>-template">
34+
<script type="text/x-magento-template" id="<?= /* @noEscape */ $blockHtmlId ?>-template">
3435
<div id="<%- data.id %>" class="file-row">
3536
<span class="file-info"><%- data.name %> (<%- data.size %>)</span>
3637
<div class="progressbar-container">
@@ -52,7 +53,7 @@ require([
5253
var maxFileSize = <?= $block->escapeJs($block->getFileSizeService()->getMaxFileSize()) ?>,
5354
allowedExtensions = '<?= $block->escapeHtml(implode(' ', $allowedExtensions)) ?>';
5455

55-
$('#<?= $block->getHtmlId() ?> .fileupload').fileupload({
56+
$('#<?= /* @noEscape */ $blockHtmlId ?> .fileupload').fileupload({
5657
dataType: 'json',
5758
formData: {
5859
isAjax: 'true',
@@ -62,9 +63,9 @@ require([
6263
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
6364
allowedExtensions: allowedExtensions,
6465
maxFileSize: maxFileSize,
65-
dropZone: $('#<?= $block->getHtmlId() ?>').closest('[role="dialog"]'),
66+
dropZone: $('#<?= /* @noEscape */ $blockHtmlId ?>').closest('[role="dialog"]'),
6667
add: function (e, data) {
67-
var progressTmpl = mageTemplate('#<?= $block->getHtmlId() ?>-template'),
68+
var progressTmpl = mageTemplate('#<?= /* @noEscape */ $blockHtmlId ?>-template'),
6869
fileSize,
6970
tmpl,
7071
validationResult;
@@ -108,7 +109,7 @@ require([
108109
}
109110
});
110111

111-
$(tmpl).data('image', data).appendTo('#<?= $block->getHtmlId() ?>');
112+
$(tmpl).data('image', data).appendTo('#<?= /* @noEscape */ $blockHtmlId ?>');
112113

113114
return true;
114115
});
@@ -145,7 +146,7 @@ require([
145146
}
146147
});
147148

148-
$('#<?= $block->getHtmlId() ?> .fileupload').fileupload('option', {
149+
$('#<?= /* @noEscape */ $blockHtmlId ?> .fileupload').fileupload('option', {
149150
process: [{
150151
action: 'load',
151152
fileTypes: /^image\/(gif|jpeg|png)$/,

app/code/Magento/Payment/view/frontend/templates/transparent/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $code = $block->escapeHtml($block->getMethodCode());
99
$ccExpMonth = $block->getInfoData('cc_exp_month');
1010
$ccExpYear = $block->getInfoData('cc_exp_year');
1111
$ccType = $block->getInfoData('cc_type');
12-
$content = '<img src=\"' . $block->getViewFileUrl('Magento_Checkout::cvv.png') . '\" alt=\"' .
12+
$content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Checkout::cvv.png')) . '\" alt=\"' .
1313
$block->escapeHtml(__('Card Verification Number Visual Reference')) . '\" title=\"' .
1414
$block->escapeHtml(__('Card Verification Number Visual Reference')) . '\" />';
1515
?>

app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $helpLink = $block->escapeUrl($block->getHelpLink());
1313
<?php if ($helpLink) : ?>
1414
<div class="paypal-payment-notice">
1515
<?= $block->escapeHtml(__('Not sure what PayPal payment method to use? Click ')) ?>
16-
<a href="<?= /* @noEscape */$helpLink; ?>" target="_blank"><?= $block->escapeHtml(__('here')) ?></a>
16+
<a href="<?= /* @noEscape */ $helpLink; ?>" target="_blank"><?= $block->escapeHtml(__('here')) ?></a>
1717
<?= $block->escapeHtml(__(' to learn more.')) ?>
1818
</div>
1919
<?php endif; ?>

app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"categoryTree": {
2323
"data": <?= /* @noEscape */
2424
$this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getTreeArray()); ?>,
25-
"url": "<?= /* @noEscape */
26-
$block->escapeUrl($block->getLoadTreeUrl()); ?>"
25+
"url": "<?= $block->escapeUrl($block->getLoadTreeUrl()); ?>"
2726
}
2827
}
2928
}

app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="admin__field-control control">
1616
<select data-role="entity-type-selector" class="admin__control-select select" onchange="window.location = this.value;" id="entity-type-selector">
1717
<?php foreach ($block->getModes() as $mode => $label) : ?>
18-
<option <?= /* noEscape */ $block->isMode($mode) ? 'selected="selected" ' : '' ?>value="<?= $block->escapeUrl($block->getModeUrl($mode)) ?>"><?= $block->escapeHtml($label) ?></option>
18+
<option <?= /* @noEscape */ $block->isMode($mode) ? 'selected="selected" ' : '' ?>value="<?= $block->escapeUrl($block->getModeUrl($mode)) ?>"><?= $block->escapeHtml($label) ?></option>
1919
<?php endforeach; ?>
2020
</select>
2121
</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
@@ -10,12 +10,12 @@ $tokens = $block->getPaymentTokens();
1010
<?php if (count($tokens) !== 0) : ?>
1111
<div class="table-wrapper my-credit-cards">
1212
<table class="data table table-credit-cards" id="my-orders-table">
13-
<caption class="table-caption"><?= /* @noEscape */ __('Stored Payment Methods') ?></caption>
13+
<caption class="table-caption"><?= $block->escapeHtml(__('Stored Payment Methods')) ?></caption>
1414
<thead>
1515
<tr>
16-
<th scope="col" class="col card-number"><?= /* @noEscape */ __('Card Number') ?></th>
17-
<th scope="col" class="col expire"><?= /* @noEscape */ __('Expiration Date') ?></th>
18-
<th scope="col" class="col card-type"><?= /* @noEscape */ __('Type') ?></th>
16+
<th scope="col" class="col card-number"><?= $block->escapeHtml(__('Card Number')) ?></th>
17+
<th scope="col" class="col expire"><?= $block->escapeHtml(__('Expiration Date')) ?></th>
18+
<th scope="col" class="col card-type"><?= $block->escapeHtml(__('Type')) ?></th>
1919
<th scope="col" class="col actions">&nbsp;</th>
2020
</tr>
2121
</thead>
@@ -30,5 +30,5 @@ $tokens = $block->getPaymentTokens();
3030
</div>
3131

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

0 commit comments

Comments
 (0)