Skip to content

Commit 2b62411

Browse files
authored
Merge pull request #4269 from magento-obsessive-owls/MC-16624
[Owls] MC-16624
2 parents 2dd907a + 1316b51 commit 2b62411

File tree

15 files changed

+91
-128
lines changed

15 files changed

+91
-128
lines changed

app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions.phtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
*
88
* @var \Magento\Backend\Block\Widget\Form\Container $block
99
*/
10-
11-
// @codingStandardsIgnoreFile
1210
?>
13-
<div><p><?= /* @escapeNotVerified */ __('The integration you selected asks you to approve access to the following:') ?></p></div>
11+
<div><p><?= $block->escapeHtml(__('The integration you selected asks you to approve access to the following:')) ?></p></div>
1412
<div id="integration-activate-permissions-tabs">
1513
<?= $block->getChildHtml('tabs') ?>
1614
</div>

app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,19 @@
77
*
88
* @var \Magento\Integration\Block\Adminhtml\Integration\Activate\Permissions\Tab\Webapi $block
99
*/
10-
11-
// @codingStandardsIgnoreFile
12-
1310
?>
1411
<fieldset class="admin__fieldset form-inline entry-edit">
15-
<?php if ($block->isTreeEmpty()): ?>
16-
<p class="empty"><?= /* @escapeNotVerified */ __('No permissions requested') ?></p>
17-
<?php else: ?>
12+
<?php if ($block->isTreeEmpty()) : ?>
13+
<p class="empty"><?= $block->escapeHtml(__('No permissions requested')) ?></p>
14+
<?php else : ?>
1815
<div class="field" data-role="tree-resources-container">
1916
<div class="control">
2017
<div id="resource-tree" class="tree x-tree" data-role="resource-tree"></div>
2118
</div>
2219
</div>
2320
<?php endif ?>
2421
</fieldset>
25-
<?php if (!$block->isTreeEmpty()): ?>
22+
<?php if (!$block->isTreeEmpty()) : ?>
2623
<script>
2724
require(["jquery", "Magento_User/js/roles-tree"], function($){
2825
$.widget('mage.rolesTree', $.mage.rolesTree, {
@@ -35,8 +32,8 @@
3532
});
3633

3734
$('[data-role="resource-tree"]').rolesTree({
38-
'treeInitData': <?= /* @escapeNotVerified */ $block->getResourcesTreeJson() ?>,
39-
'treeInitSelectedData': <?= /* @escapeNotVerified */ $block->getSelectedResourcesJson() ?>
35+
'treeInitData': <?= /* @noEscape */ $block->getResourcesTreeJson() ?>,
36+
'treeInitSelectedData': <?= /* @noEscape */ $block->getSelectedResourcesJson() ?>
4037
});
4138
});
4239
</script>

app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
*
88
* @var \Magento\Backend\Block\Template $block
99
*/
10-
11-
// @codingStandardsIgnoreFile
1210
?>
1311
<script>
1412
require([
@@ -20,11 +18,11 @@
2018
], function ($, Confirm) {
2119

2220
window.integration = new Integration(
23-
'<?= /* @escapeNotVerified */ $block->getUrl('*/*/permissionsDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
24-
'<?= /* @escapeNotVerified */ $block->getUrl('*/*/tokensDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
25-
'<?= /* @escapeNotVerified */ $block->getUrl('*/*/tokensExchange', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
26-
'<?= /* @escapeNotVerified */ $block->getUrl('*/*') ?>',
27-
'<?= /* @escapeNotVerified */ $block->getUrl('*/*/loginSuccessCallback') ?>'
21+
'<?= $block->escapeUrl($block->getUrl('*/*/permissionsDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false])) ?>',
22+
'<?= $block->escapeUrl($block->getUrl('*/*/tokensDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false])) ?>',
23+
'<?= $block->escapeUrl($block->getUrl('*/*/tokensExchange', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false])) ?>',
24+
'<?= $block->escapeUrl($block->getUrl('*/*')) ?>',
25+
'<?= $block->escapeUrl($block->getUrl('*/*/loginSuccessCallback')) ?>'
2826
);
2927

3028
/**
@@ -34,8 +32,8 @@
3432
$('div#integrationGrid').on('click', 'button#delete', function (e) {
3533

3634
new Confirm({
37-
title: '<?= /* @escapeNotVerified */ __('Are you sure?') ?>',
38-
content: "<?= /* @escapeNotVerified */ __("Are you sure you want to delete this integration? You can't undo this action.") ?>",
35+
title: '<?= $block->escapeHtml(__('Are you sure?')) ?>',
36+
content: "<?= $block->escapeHtml(__("Are you sure you want to delete this integration? You can't undo this action.")) ?>",
3937
actions: {
4038
confirm: function () {
4139
$.mage.dataPost().postData({action: $(e.target).data('url'), data: {}});

app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
*
88
* @var \Magento\Backend\Block\Template $block
99
*/
10-
11-
// @codingStandardsIgnoreFile
12-
1310
?>
14-
<div><p><?= /* @escapeNotVerified */ __("Please setup or sign in into your 3rd party account to complete setup of this integration.") ?></p></div>
11+
<div><p><?= $block->escapeHtml(__("Please setup or sign in into your 3rd party account to complete setup of this integration.")) ?></p></div>

app/code/Magento/Integration/view/adminhtml/templates/resourcetree.phtml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,33 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
9-
?>
10-
11-
<?php
127
/** @var $block \Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Webapi */
138
?>
149

1510
<?= $block->getChildHtml() ?>
1611

1712
<fieldset class="fieldset form-inline entry-edit">
1813
<legend class="legend">
19-
<span><?= /* @escapeNotVerified */ __('Available APIs') ?></span>
14+
<span><?= $block->escapeHtml(__('Available APIs')) ?></span>
2015
</legend><br />
2116

2217
<div class="field">
23-
<label class="label" for="all_resources"><span><?= /* @escapeNotVerified */ __('Resource Access') ?></span></label>
18+
<label class="label" for="all_resources"><span><?= $block->escapeHtml(__('Resource Access')) ?></span></label>
2419

2520
<div class="control">
2621
<select id="all_resources" name="all_resources" onchange="jQuery('[data-role=tree-resources-container]').toggle()" class="select">
27-
<option value="0" <?= ($block->isEverythingAllowed() ? '' : 'selected="selected"') ?>><?= /* @escapeNotVerified */ __('Custom') ?></option>
28-
<option value="1" <?= ($block->isEverythingAllowed() ? 'selected="selected"' : '') ?>><?= /* @escapeNotVerified */ __('All') ?></option>
22+
<option value="0" <?= ($block->isEverythingAllowed() ? '' : 'selected="selected"') ?>><?= $block->escapeHtml(__('Custom')) ?></option>
23+
<option value="1" <?= ($block->isEverythingAllowed() ? 'selected="selected"' : '') ?>><?= $block->escapeHtml(__('All')) ?></option>
2924
</select>
3025
</div>
3126
</div>
3227

33-
<div class="field<?php if ($block->isEverythingAllowed()):?> no-display<?php endif?>" data-role="tree-resources-container">
34-
<label class="label"><span><?= /* @escapeNotVerified */ __('Resources') ?></span></label>
28+
<div class="field<?php if ($block->isEverythingAllowed()) : ?> no-display<?php endif?>" data-role="tree-resources-container">
29+
<label class="label"><span><?= $block->escapeHtml(__('Resources')) ?></span></label>
3530

3631
<div class="control">
37-
<div class="tree x-tree" data-role="resource-tree" data-mage-init='<?php
38-
echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode([
32+
<div class="tree x-tree" data-role="resource-tree" data-mage-init='<?=
33+
$block->escapeHtml($this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
3934
'rolesTree' => [
4035
"treeInitData" => $block->getTree(),
4136
"treeInitSelectedData" => $block->getSelectedResources(),

app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
86
?>
97

108
<section class="page-partners">
11-
<h2 class="page-sub-title"><?= /* @escapeNotVerified */ __('Platinum Partners') ?></h2>
9+
<h2 class="page-sub-title"><?= $block->escapeHtml(__('Platinum Partners')) ?></h2>
1210
<p class="partners-description">
13-
<?php /* @escapeNotVerified */
14-
echo __(
11+
<?= $block->escapeHtml(__(
1512
'Representing Magento\'s highest level of partner engagement, Magento Platinum Partners have established themselves as leaders and innovators of key products and services designed to help merchants and brands grow their business. ' .
1613
'Magento reserves the Platinum level for select trusted partners that are committed to offering integrations of commerce features, functions, and tools, as well as back-end systems and operations, to extend and enhance the power of the Magento commerce platform.'
17-
); ?>
14+
)); ?>
1815
</p>
19-
<h3 class="page-sub-sub-title"><?= /* @escapeNotVerified */ __('Featured Platinum Partners') ?></h3>
16+
<h3 class="page-sub-sub-title"><?= $block->escapeHtml(__('Featured Platinum Partners')) ?></h3>
2017
<div data-role="partners-block" class="partners-block">
2118
<div data-role="spinner" class="admin__data-grid-loading-mask">
2219
<div class="spinner">
@@ -29,40 +26,39 @@
2926
<div class="row row-gutter partners-footer">
3027
<div class="col-m-5">
3128
<div class="partners-search">
32-
<h2 class="page-sub-title"><?= /* @escapeNotVerified */ __('Partner search') ?></h2>
29+
<h2 class="page-sub-title"><?= $block->escapeHtml(__('Partner search')) ?></h2>
3330
<p>
34-
<?php /* @escapeNotVerified */
35-
echo __(
31+
<?= $block->escapeHtml(__(
3632
'Magento has a thriving ecosystem of technology partners to help merchants and brands deliver the best possible customer experiences. ' .
3733
'They are recognized as experts in eCommerce, search, email marketing, payments, tax, fraud, optimization and analytics, fulfillment, and more. ' .
3834
'Visit the Magento Partner Directory to see all of our trusted partners.'
39-
); ?>
35+
)); ?>
4036
</p>
4137
<a class="action-secondary" target="_blank"
4238
href="http://partners.magento.com/partner_locator/search.aspx">
43-
<?= /* @escapeNotVerified */ __('More Partners') ?>
39+
<?= $block->escapeHtml(__('More Partners')) ?>
4440
</a>
4541
</div>
4642
</div>
4743
<div class="col-m-3">
4844
<img
4945
class="magento-marketplace-logo"
50-
src="<?php /* @escapeNotVerified */ echo $block
51-
->getViewFileUrl('Magento_Marketplace::partners/images/magento-marketplace.svg');
46+
src="<?= $block->escapeUrl($block
47+
->getViewFileUrl('Magento_Marketplace::partners/images/magento-marketplace.svg'));
5248
?>"
5349
alt="Partner"/>
5450
</div>
5551
<div class="col-m-4">
56-
<h2 class="page-sub-title"><?= /* @escapeNotVerified */ __('Magento Marketplace') ?></h2>
52+
<h2 class="page-sub-title"><?= $block->escapeHtml(__('Magento Marketplace')) ?></h2>
5753
<p class="partner-description">
58-
<?php /* @escapeNotVerified */ echo __(
54+
<?= $block->escapeHtml(__(
5955
'Extensions and Themes are an essential component of the Magento Ecosystem. ' .
6056
'Please visit the Magento Marketplace to see the latest innovations that developers have created to enhance your Magento Store.'
61-
); ?>
57+
)); ?>
6258
</p>
6359
<a class="action-secondary" target="_blank"
6460
href="https://marketplace.magento.com/">
65-
<?= /* @escapeNotVerified */ __('Visit Magento Marketplaces') ?>
61+
<?= $block->escapeHtml(__('Visit Magento Marketplaces')) ?>
6662
</a>
6763
</div>
6864
</div>
@@ -73,8 +69,10 @@
7369
{
7470
"*": {
7571
"Magento_Marketplace/default": {
76-
"url": "<?= $block->getUrl('marketplace/partners/index',
77-
['_current' => true, 'block' => '', 'period' => '']) ?>"
72+
"url": "<?= $block->escapeUrl($block->getUrl(
73+
'marketplace/partners/index',
74+
['_current' => true, 'block' => '', 'period' => '']
75+
)) ?>"
7876
}
7977
}
8078
}

app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
?>
107
<?php
118
$partners = $block->getPartners();
@@ -22,17 +19,17 @@ $partners = $block->getPartners();
2219
<?= $block->escapeHtml($partner['description']) ?>
2320
<br />
2421
<a href="<?= $block->escapeHtml($partner['url_page']) ?>" target="_blank">
25-
<?= /* @escapeNotVerified */ __('Read More') ?>
22+
<?= $block->escapeHtml(__('Read More')) ?>
2623
</a>
2724
<br />
2825
<a href="<?= $block->escapeHtml($partner['url_partner_page']) ?>" target="_blank">
29-
<?= /* @escapeNotVerified */ __('Partner Page') ?>
26+
<?= $block->escapeHtml(__('Partner Page')) ?>
3027
</a>
3128
</p>
3229
</div>
3330
<?php endforeach; ?>
3431
<?php else : ?>
3532
<p>
36-
<?= /* @escapeNotVerified */ __('No partners were found') ?>
33+
<?= $block->escapeHtml(__('No partners were found')) ?>
3734
</p>
3835
<?php endif; ?>

app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,26 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
?>
107
<form method="post" action="" id="login-form" data-mage-init='{"form": {}, "validation": {}}'>
118
<fieldset class="admin__fieldset">
12-
<legend class="admin__legend"><span><?= /* @escapeNotVerified */ __('Password Help') ?></span></legend><br/>
13-
<input name="form_key" type="hidden" value="<?= /* @escapeNotVerified */ $block->getFormKey() ?>" />
14-
<p class="admin__field-info"><?= /* @escapeNotVerified */ __('Enter your email address. You will receive an email with a link to reset your password.') ?></p>
9+
<legend class="admin__legend"><span><?= $block->escapeHtml(__('Password Help')) ?></span></legend><br/>
10+
<input name="form_key" type="hidden" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
11+
<p class="admin__field-info"><?= $block->escapeHtml(__('Enter your email address. You will receive an email with a link to reset your password.')) ?></p>
1512
<div class="admin__field _required field-email">
16-
<label for="email" class="admin__field-label"><span><?= /* @escapeNotVerified */ __('Email address') ?></span></label>
13+
<label for="email" class="admin__field-label"><span><?= $block->escapeHtml(__('Email address')) ?></span></label>
1714
<div class="admin__field-control">
1815
<input type="text" id="email" name="email" value="" data-validate="{required:true, 'validate-email':true}" class="admin__control-text" />
1916
</div>
2017
</div>
2118
<?= $block->getChildHtml('form.additional.info') ?>
2219
<div class="form-actions">
2320
<div class="actions">
24-
<button class="action-retrieve action-primary" type="submit"><span><?= /* @escapeNotVerified */ __('Retrieve Password') ?></span></button>
21+
<button class="action-retrieve action-primary" type="submit"><span><?= $block->escapeHtml(__('Retrieve Password')) ?></span></button>
2522
</div>
2623
<div class="links">
27-
<a class="action-back" href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml', ['_nosecret' => true]) ?>">
28-
<?= /* @escapeNotVerified */ __('Back to Sign in') ?>
24+
<a class="action-back" href="<?= $block->escapeUrl($block->getUrl('adminhtml', ['_nosecret' => true])) ?>">
25+
<?= $block->escapeHtml(__('Back to Sign in')) ?>
2926
</a>
3027
</div>
3128
</div>

app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
?>
107
<div class="links">
11-
<a class="action-forgotpassword" href="<?= /* @escapeNotVerified */ $this->helper('Magento\Backend\Helper\Data')->getUrl('adminhtml/auth/forgotpassword', ['_nosecret' => true]) ?>"><?= /* @escapeNotVerified */ __('Forgot your password?') ?></a>
8+
<a class="action-forgotpassword" href="<?= $block->escapeUrl($block->getUrl('adminhtml/auth/forgotpassword', ['_nosecret' => true])) ?>"><?= $block->escapeHtml(__('Forgot your password?')) ?></a>
129
</div>

app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,30 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
?>
107

11-
<form method="post" data-mage-init='{"form": {}, "validation": {}}' action="<?= /* @escapeNotVerified */ $block->getUrl('*/auth/resetpasswordpost', ['_query' => ['id' => $block->getUserId(), 'token' => $block->getResetPasswordLinkToken()]]) ?>" id="reset-password-form" autocomplete="off">
8+
<form method="post" data-mage-init='{"form": {}, "validation": {}}' action="<?= $block->escapeUrl($block->getUrl('*/auth/resetpasswordpost', ['_query' => ['id' => $block->getUserId(), 'token' => $block->getResetPasswordLinkToken()]])) ?>" id="reset-password-form" autocomplete="off">
129
<fieldset class="admin__fieldset">
13-
<legend class="admin__legend"><span><?= /* @escapeNotVerified */ __('Reset a Password') ?></span></legend><br />
14-
<input name="form_key" type="hidden" value="<?= /* @escapeNotVerified */ $block->getFormKey() ?>" />
10+
<legend class="admin__legend"><span><?= $block->escapeHtml(__('Reset a Password')) ?></span></legend><br />
11+
<input name="form_key" type="hidden" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
1512
<div class="admin__field _required field-password">
16-
<label class="admin__field-label" for="password"><span><?= /* @escapeNotVerified */ __('New Password') ?></span></label>
13+
<label class="admin__field-label" for="password"><span><?= $block->escapeHtml(__('New Password')) ?></span></label>
1714
<div class="admin__field-control">
1815
<input type="password" class="admin__control-text" data-validate="{required:true, 'validate-admin-password':true}" name="password" id="password" placeholder="new password" autocomplete="off" />
1916
</div>
2017
</div>
2118
<div class="admin__field _required field-confirmation">
22-
<label class="admin__field-label" for="confirmation"><span><?= /* @escapeNotVerified */ __('Confirm New Password') ?></span></label>
19+
<label class="admin__field-label" for="confirmation"><span><?= $block->escapeHtml(__('Confirm New Password')) ?></span></label>
2320
<div class="admin__field-control">
2421
<input type="password" class="admin__control-text" data-validate="{required:true, 'validate-cpassword':true}" name="confirmation" id="confirmation" placeholder="confirm new password" autocomplete="off" />
2522
</div>
2623
</div>
2724
<div class="form-actions">
2825
<div class="actions">
29-
<button type="submit" title="<?= /* @escapeNotVerified */ __('Reset Password') ?>" class="action-reset action-primary"><span><?= /* @escapeNotVerified */ __('Reset Password') ?></span></button>
26+
<button type="submit" title="<?= $block->escapeHtml(__('Reset Password')) ?>" class="action-reset action-primary"><span><?= $block->escapeHtml(__('Reset Password')) ?></span></button>
3027
</div>
3128
<div class="links">
32-
<a class="action-back" href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml', ['_nosecret' => true]) ?>"><?= /* @escapeNotVerified */ __('Back to Sign in') ?></a>
29+
<a class="action-back" href="<?= $block->escapeUrl($block->getUrl('adminhtml', ['_nosecret' => true])) ?>"><?= $block->escapeHtml(__('Back to Sign in')) ?></a>
3330
</div>
3431
</div>
3532
</fieldset>

0 commit comments

Comments
 (0)