Skip to content

Commit 7caf492

Browse files
author
Hwashiang Yu
committed
MC-18153: Correct phtml templates
- Corrected phtml files
1 parent cb12aa6 commit 7caf492

File tree

146 files changed

+381
-381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+381
-381
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626

2727
<?php if ($block->getCriticalCount()) : ?>
2828
<div class="message message-warning error">
29-
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
29+
<a class="message-link" href="#" title="<?= $block->escapeHtmlAttr(__('Critical System Messages')) ?>">
3030
<?= (int) $block->getCriticalCount() ?>
3131
</a>
3232
</div>
3333
<?php endif; ?>
3434

3535
<?php if ($block->getMajorCount()) : ?>
3636
<div class="message message-warning warning">
37-
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
37+
<a class="message-link" href="#" title="<?= $block->escapeHtmlAttr(__('Major System Messages')) ?>">
3838
<?= (int) $block->getMajorCount() ?>
3939
</a>
4040
</div>
4141
<?php endif; ?>
4242
</div>
43-
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
43+
<div id="message-system-all" title="<?= $block->escapeHtmlAttr(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtmlAttr($block->getSystemMessageDialogJson()) ?>'></div>
4444
</div>
4545
</div>

app/code/Magento/AdvancedSearch/view/adminhtml/templates/system/config/testconnection.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"successText": "<?= $block->escapeHtmlAttr(__('Successful! Test again?')) ?>",
1111
"failedText": "<?= $block->escapeHtmlAttr(__('Connection failed! Test again?')) ?>",
1212
"fieldMapping": "<?= /* @noEscape */ $block->getFieldMapping() ?>"}, "validation": {}}'>
13-
<span id="<?= $block->getHtmlId() ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
13+
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
1414
</button>

app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
3939
'required':true,
4040
'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
4141
}">
42-
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
42+
<option value=""><?= $block->escapeHtmlAttr(__('Please Select')) ?></option>
4343
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
44-
<option value="<?= $block->escapeHtml($typeCode) ?>"
44+
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>"
4545
<?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif; ?>>
4646
<?= $block->escapeHtml($typeName) ?>
4747
</option>
@@ -81,7 +81,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
8181
'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
8282
}">
8383
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
84-
<option value="<?= $block->escapeHtml($k) ?>"
84+
<option value="<?= $block->escapeHtmlAttr($k) ?>"
8585
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif; ?>>
8686
<?= $block->escapeHtml($v) ?>
8787
</option>
@@ -93,7 +93,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
9393
data-container="<?= /* @noEscape */ $code ?>-cc-year"
9494
data-validate="{required:true}">
9595
<?php foreach ($block->getCcYears() as $k => $v) : ?>
96-
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
96+
<option value="<?= /* @noEscape */ $k ? $block->escapeHtmlAttr($k) : '' ?>"
9797
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif; ?>>
9898
<?= $block->escapeHtml($v) ?>
9999
</option>
@@ -113,7 +113,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
113113
<div class="admin__field-control">
114114
<input type="text"
115115
data-container="<?= /* @noEscape */ $code ?>-cc-cvv"
116-
title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
116+
title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
117117
class="admin__control-text cvv"
118118
id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"
119119
value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"

app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/form/cc.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
2323
class="required-entry validate-cc-type-select admin__control-select">
2424
<option value=""></option>
2525
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
26-
<option value="<?= $block->escapeHtml($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
26+
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
2727
<?= $block->escapeHtml($typeName) ?>
2828
</option>
2929
<?php endforeach ?>
@@ -36,7 +36,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
3636
</label>
3737
<div class="admin__field-control">
3838
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number" name="payment[cc_number]"
39-
title="<?= $block->escapeHtml(__('Credit Card Number')) ?>" class="admin__control-text validate-cc-number"
39+
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>" class="admin__control-text validate-cc-number"
4040
value="<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"/>
4141
</div>
4242
</div>
@@ -48,7 +48,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4848
<select id="<?= /* @noEscape */ $code ?>_cc_exp_month" name="payment[cc_exp_month]"
4949
class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
5050
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
51-
<option value="<?= $block->escapeHtml($k) ?>"
51+
<option value="<?= $block->escapeHtmlAttr($k) ?>"
5252
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif ?>>
5353
<?= $block->escapeHtml($v) ?>
5454
</option>
@@ -72,7 +72,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
7272
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
7373
</label>
7474
<div class="admin__field-control">
75-
<input type="text" title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
75+
<input type="text" title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
7676
class="required-entry validate-cc-cvn admin__control-cvn admin__control-text"
7777
id="<?= /* @noEscape */ $code ?>_cc_cid"
7878
name="payment[cc_cid]" value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"/>

app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<a href="<?= $block->escapeUrl($_SERVER['HTTP_REFERER']) ?>">
2525
<?= $block->escapeHtml(__('previous page')) ?></a><?= $block->escapeHtml(__('.')) ?>
2626
<?php else : ?>
27-
<a href="<?= $block->escapeHtmlAttr('javascript:history.back()') ?>">
27+
<a href="<?= $block->escapeUrl('javascript:history.back()') ?>">
2828
<?= $block->escapeHtml(__('previous page')) ?></a><?= $block->escapeHtml(__('.')) ?>
2929
<?php endif ?>
3030
</span>

app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p class="switcher"><label for="store_switcher"><?= $block->escapeHtml(__('View Statistics For:')) ?></label>
88
<?= $block->getHintHtml() ?>
99
<select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
10-
<option value=""><?= $block->escapeHtml(__('All Websites')) ?></option>
10+
<option value=""><?= $block->escapeHtmlAttr(__('All Websites')) ?></option>
1111
<?php foreach ($block->getWebsiteCollection() as $_website) : ?>
1212
<?php $showWebsite = false; ?>
1313
<?php foreach ($block->getGroupCollection($_website) as $_group) : ?>

app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="fileinput-button form-buttons button">
2121
<span><?= $block->escapeHtml(__('Browse Files...')) ?></span>
2222
<input id="fileupload" type="file" name="<?= $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>"
23-
data-url="<?= $block->escapeHtmlAttr($block->getConfig()->getUrl()) ?>" multiple="multiple" />
23+
data-url="<?= $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple="multiple" />
2424
</div>
2525
<div class="clear"></div>
2626
<script id="<?= $block->getHtmlId() ?>-template" type="text/x-magento-template" data-template="uploader">

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ $part = $block->getShowPart();
1515
<?= /* @noEscape */ $edition ?>
1616
class="logo">
1717
<img class="logo-img" src="<?= /* @noEscape */ $block->getViewFileUrl($logoSrc) ?>"
18-
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>" title="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
18+
alt="<?= $block->escapeHtmlAttr(__('Magento Admin Panel')) ?>" title="<?= $block->escapeHtmlAttr(__('Magento Admin Panel')) ?>"/>
1919
</a>
2020
<?php elseif ($part === 'user') : ?>
2121
<div class="admin-user admin__action-dropdown-wrap">
2222
<a
2323
href="<?= /* @noEscape */ $block->getUrl('adminhtml/system_account/index') ?>"
2424
class="admin__action-dropdown"
25-
title="<?= $block->escapeHtml(__('My Account')) ?>"
25+
title="<?= $block->escapeHtmlAttr(__('My Account')) ?>"
2626
data-mage-init='{"dropdown":{}}'
2727
data-toggle="dropdown">
2828
<span class="admin__action-dropdown-text">
@@ -35,15 +35,15 @@ $part = $block->getShowPart();
3535
<a
3636
href="<?= /* @noEscape */ $block->getUrl('adminhtml/system_account/index') ?>"
3737
<?= /* @noEscape */ $block->getUiId('user', 'account', 'settings') ?>
38-
title="<?= $block->escapeHtml(__('Account Setting')) ?>">
38+
title="<?= $block->escapeHtmlAttr(__('Account Setting')) ?>">
3939
<?= $block->escapeHtml(__('Account Setting')) ?> (<span class="admin-user-name"><?= $block->escapeHtml($block->getUser()->getUserName()) ?></span>)
4040
</a>
4141
</li>
4242
<?php endif; ?>
4343
<li>
4444
<a
4545
href="<?= /* @noEscape */ $block->getBaseUrl() ?>"
46-
title="<?= $block->escapeHtml(__('Customer View')) ?>"
46+
title="<?= $block->escapeHtmlAttr(__('Customer View')) ?>"
4747
target="_blank" class="store-front">
4848
<?= $block->escapeHtml(__('Customer View')) ?>
4949
</a>
@@ -52,7 +52,7 @@ $part = $block->getShowPart();
5252
<a
5353
href="<?= /* @noEscape */ $block->getLogoutLink() ?>"
5454
class="account-signout"
55-
title="<?= $block->escapeHtml(__('Sign Out')) ?>">
55+
title="<?= $block->escapeHtmlAttr(__('Sign Out')) ?>">
5656
<?= $block->escapeHtml(__('Sign Out')) ?>
5757
</a>
5858
</li>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
<div class="actions dropdown closable">
1414
<input type="hidden" name="store_switcher" id="store_switcher"
1515
data-role="store-view-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreVarName()) ?>"
16-
value="<?= $block->escapeHtml($block->getStoreId()) ?>"
16+
value="<?= $block->escapeHtmlAttr($block->getStoreId()) ?>"
1717
onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
1818
<input type="hidden" name="store_group_switcher" id="store_group_switcher"
1919
data-role="store-group-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreGroupVarName()) ?>"
20-
value="<?= $block->escapeHtml($block->getStoreGroupId()) ?>"
20+
value="<?= $block->escapeHtmlAttr($block->getStoreGroupId()) ?>"
2121
onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
2222
<input type="hidden" name="website_switcher" id="website_switcher"
2323
data-role="website-id" data-param="<?= $block->escapeHtmlAttr($block->getWebsiteVarName()) ?>"
24-
value="<?= $block->escapeHtml($block->getWebsiteId()) ?>"
24+
value="<?= $block->escapeHtmlAttr($block->getWebsiteId()) ?>"
2525
onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
2626
<button
2727
type="button"
@@ -53,7 +53,7 @@
5353
<?php $showWebsite = true; ?>
5454
<li class="store-switcher-website <?php if (!($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website))) : ?>disabled<?php endif; ?> <?php if ($block->isWebsiteSelected($website)) : ?>current<?php endif; ?>">
5555
<?php if ($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website)) : ?>
56-
<a data-role="website-id" data-value="<?= $block->escapeHtml($website->getId()) ?>" href="#">
56+
<a data-role="website-id" data-value="<?= $block->escapeHtmlAttr($website->getId()) ?>" href="#">
5757
<?= $block->escapeHtml($website->getName()) ?>
5858
</a>
5959
<?php else : ?>
@@ -65,7 +65,7 @@
6565
<?php $showGroup = true; ?>
6666
<li class="store-switcher-store <?php if (!($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group))) : ?>disabled<?php endif; ?> <?php if ($block->isStoreGroupSelected($group)) : ?>current<?php endif; ?>">
6767
<?php if ($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group)) : ?>
68-
<a data-role="store-group-id" data-value="<?= $block->escapeHtml($group->getId()) ?>" href="#">
68+
<a data-role="store-group-id" data-value="<?= $block->escapeHtmlAttr($group->getId()) ?>" href="#">
6969
<?= $block->escapeHtml($group->getName()) ?>
7070
</a>
7171
<?php else : ?>
@@ -75,7 +75,7 @@
7575
<?php endif; ?>
7676
<li class="store-switcher-store-view <?php if (!($block->isStoreSwitchEnabled() && !$block->isStoreSelected($store))) : ?>disabled<?php endif; ?> <?php if ($block->isStoreSelected($store)) :?>current<?php endif; ?>">
7777
<?php if ($block->isStoreSwitchEnabled() && ! $block->isStoreSelected($store)) : ?>
78-
<a data-role="store-view-id" data-value="<?= $block->escapeHtml($store->getId()) ?>" href="#">
78+
<a data-role="store-view-id" data-value="<?= $block->escapeHtmlAttr($store->getId()) ?>" href="#">
7979
<?= $block->escapeHtml($store->getName()) ?>
8080
</a>
8181
<?php else : ?>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<?php endif; ?>
1111

1212
<?php if (!$_element->getNoContainer()) : ?>
13-
<fieldset class="admin__fieldset fieldset <?= $block->escapeHtmlAttr($_element->getClass()) ?>" id="<?= $_element->getHtmlId() ?>">
13+
<fieldset class="admin__fieldset fieldset <?= $block->escapeHtmlAttr($_element->getClass()) ?>" id="<?= $block->escapeHtmlAttr($_element->getHtmlId()) ?>">
1414
<?php endif; ?>
1515

1616
<?php if ($_element->getLegend()) : ?>

app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ $permissions = $block->getData('permissions');
1414
</h2>
1515
<?php if ($permissions->hasAccessToFlushCatalogImages()) : ?>
1616
<p>
17-
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanImagesUrl()); ?>')" type="button">
17+
<button onclick="setLocation('<?= $block->escapeHtmlAttr($block->escapeJs($block->escapeUrl($block->getCleanImagesUrl()))); ?>')" type="button">
1818
<?= $block->escapeHtml(__('Flush Catalog Images Cache')); ?>
1919
</button>
2020
<span><?= $block->escapeHtml(__('Pregenerated product images files')); ?></span>
2121
</p>
2222
<?php endif; ?>
2323
<?php if ($permissions->hasAccessToFlushJsCss()) : ?>
2424
<p>
25-
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanMediaUrl()); ?>')" type="button">
25+
<button onclick="setLocation('<?= $block->escapeHtmlAttr($block->escapeJs($block->escapeUrl($block->getCleanMediaUrl()))); ?>')" type="button">
2626
<?= $block->escapeHtml(__('Flush JavaScript/CSS Cache')); ?>
2727
</button>
2828
<span><?= $block->escapeHtml(__('Themes JavaScript and CSS files combined to one file')) ?></span>
2929
</p>
3030
<?php endif; ?>
3131
<?php if (!$block->isInProductionMode() && $permissions->hasAccessToFlushStaticFiles()) : ?>
3232
<p>
33-
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanStaticFilesUrl()); ?>')" type="button">
33+
<button onclick="setLocation('<?= $block->escapeHtmlAttr($block->escapeJs($block->escapeUrl($block->getCleanStaticFilesUrl()))); ?>')" type="button">
3434
<?= $block->escapeHtml(__('Flush Static Files Cache')); ?>
3535
</button>
3636
<span><?= $block->escapeHtml(__('Preprocessed view files and static files')); ?></span>

app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<strong><?= $block->escapeHtml($_link['label']) ?></strong>
1717
<?php endif; ?>
1818
<?php else : ?>
19-
<a href="<?= $block->escapeUrl($_link['url']) ?>" title="<?= $block->escapeHtml($_link['title']) ?>"><?= $block->escapeHtml($_link['label']) ?></a>
19+
<a href="<?= $block->escapeUrl($_link['url']) ?>" title="<?= $block->escapeHtmlAttr($_link['title']) ?>"><?= $block->escapeHtml($_link['label']) ?></a>
2020
<?php endif; ?>
2121
<?php if ($_index != $_size-1) : ?>
2222
&raquo;

app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</span>
2727
<?php if (isset($option['hint'])) : ?>
2828
<div class="tooltip" <?= /* @noEscape */ $block->getUiId('item', $key, 'tooltip') ?>>
29-
<a href="<?= $block->escapeHtml($option['hint']['href']) ?>" class="help">
29+
<a href="<?= $block->escapeUrl($option['hint']['href']) ?>" class="help">
3030
<?= $block->escapeHtml($option['hint']['label']) ?>
3131
</a>
3232
</div>

0 commit comments

Comments
 (0)