Skip to content

Commit c03b511

Browse files
committed
Convert long form tags with echo to use short-echo tags #1563
Caught another variant of these; added wildcard @comment to regex
1 parent 69b5527 commit c03b511

File tree

135 files changed

+420
-420
lines changed

Some content is hidden

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

135 files changed

+420
-420
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $helper = $block->getHelper('adminhtml');
2222
window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
2323
<?php endif; ?>
2424
<?php if (isset($params['error_msg'])): ?>
25-
window.top.directPostModel.showError(<?php /* @noEscape */ echo json_encode((array)$params['error_msg']); ?>);
25+
window.top.directPostModel.showError(<?= /* @noEscape */ json_encode((array)$params['error_msg']) ?>);
2626
<?php if (isset($params['x_invoice_num'])): ?>
2727
window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
2828
<?php endif; ?>

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
2727
style="display:none;width:100%;background-color:transparent"
2828
src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>">
2929
</iframe>
30-
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */ echo $code; ?>"
30+
<fieldset class="admin__fieldset payment-method" id="payment_form_<?= /* @noEscape */ $code ?>"
3131
style="display:none;">
3232
<div class="admin__field _required">
33-
<label for="<?php /* @noEscape */ echo $code; ?>_cc_type" class="admin__field-label">
33+
<label for="<?= /* @noEscape */ $code ?>_cc_type" class="admin__field-label">
3434
<span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
3535
</label>
3636
<div class="admin__field-control">
37-
<select id="<?php /* @noEscape */ echo $code; ?>_cc_type" name="payment[cc_type]"
37+
<select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
3838
class="admin__control-select"
3939
data-validate="{
4040
'required':true,
41-
'validate-cc-type-select':'#<?php /* @noEscape */ echo $code; ?>_cc_number'
41+
'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
4242
}">
4343
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
4444
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
@@ -52,34 +52,34 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
5252
</div>
5353

5454
<div class="admin__field _required">
55-
<label for="<?php /* @noEscape */ echo $code; ?>_cc_number" class="admin__field-label">
55+
<label for="<?= /* @noEscape */ $code ?>_cc_number" class="admin__field-label">
5656
<span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
5757
</label>
5858
<div class="admin__field-control">
59-
<input type="text" id="<?php /* @noEscape */ echo $code; ?>_cc_number"
59+
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number"
6060
name="payment[cc_number]"
6161
data-validate="{
6262
'required-number':true,
63-
'validate-cc-number':'#<?php /* @noEscape */ echo $code; ?>_cc_type',
64-
'validate-cc-type':'#<?php /* @noEscape */ echo $code; ?>_cc_type'
63+
'validate-cc-number':'#<?= /* @noEscape */ $code ?>_cc_type',
64+
'validate-cc-type':'#<?= /* @noEscape */ $code ?>_cc_type'
6565
}"
6666
class="admin__control-text"
67-
value="<?php /* @noEscape */ echo $block->getInfoData('cc_number'); ?>"/>
67+
value="<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"/>
6868
</div>
6969
</div>
7070

71-
<div class="admin__field _required field-date" id="<?php /* @noEscape */ echo $code; ?>_cc_type_exp_div">
72-
<label for="<?php /* @noEscape */ echo $code; ?>_expiration" class="admin__field-label">
71+
<div class="admin__field _required field-date" id="<?= /* @noEscape */ $code ?>_cc_type_exp_div">
72+
<label for="<?= /* @noEscape */ $code ?>_expiration" class="admin__field-label">
7373
<span><?= $block->escapeHtml(__('Expiration Date')) ?></span>
7474
</label>
7575

7676
<div class="admin__field-control">
77-
<select id="<?php /* @noEscape */ echo $code; ?>_expiration"
77+
<select id="<?= /* @noEscape */ $code ?>_expiration"
7878
name="payment[cc_exp_month]"
7979
class="admin__control-select admin__control-select-month"
8080
data-validate="{
8181
'required':true,
82-
'validate-cc-exp':'#<?php /* @noEscape */ echo $code; ?>_expiration_yr'
82+
'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
8383
}">
8484
<?php foreach ($block->getCcMonths() as $k => $v): ?>
8585
<option value="<?= $block->escapeHtml($k) ?>"
@@ -88,13 +88,13 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
8888
</option>
8989
<?php endforeach; ?>
9090
</select>
91-
<select id="<?php /* @noEscape */ echo $code; ?>_expiration_yr"
91+
<select id="<?= /* @noEscape */ $code ?>_expiration_yr"
9292
name="payment[cc_exp_year]"
9393
class="admin__control-select admin__control-select-year"
94-
data-container="<?php /* @noEscape */ echo $code; ?>-cc-year"
94+
data-container="<?= /* @noEscape */ $code ?>-cc-year"
9595
data-validate="{required:true}">
9696
<?php foreach ($block->getCcYears() as $k => $v): ?>
97-
<option value="<?php /* @noEscape */ echo $k ? $block->escapeHtml($k) : ''; ?>"
97+
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
9898
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif; ?>>
9999
<?= $block->escapeHtml($v) ?>
100100
</option>
@@ -106,21 +106,21 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
106106
<?php if ($block->hasVerification()): ?>
107107
<div class="admin__field _required field-cvv">
108108
<label class="admin__field-label"
109-
for="<?php /* @noEscape */ echo $code; ?>_cc_cid"
110-
id="<?php /* @noEscape */ echo $code; ?>_cc_type_cvv_div">
109+
for="<?= /* @noEscape */ $code ?>_cc_cid"
110+
id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
111111
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
112112
</label>
113113

114114
<div class="admin__field-control">
115115
<input type="text"
116-
data-container="<?php /* @noEscape */ echo $code; ?>-cc-cvv"
116+
data-container="<?= /* @noEscape */ $code ?>-cc-cvv"
117117
title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
118118
class="admin__control-text cvv"
119-
id="<?php /* @noEscape */ echo $code; ?>_cc_cid" name="payment[cc_cid]"
120-
value="<?php /* @noEscape */ echo $block->getInfoData('cc_cid') ?>"
119+
id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"
120+
value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"
121121
data-validate="{
122122
'required-number':true,
123-
'validate-cc-cvn':'#<?php /* @noEscape */ echo $code; ?>_cc_type'
123+
'validate-cc-cvn':'#<?= /* @noEscape */ $code ?>_cc_type'
124124
}"
125125
autocomplete="off"/>
126126
</div>
@@ -138,17 +138,17 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
138138
/**
139139
* Disable card server validation in admin
140140
*/
141-
order.addExcludedPaymentMethod('<?php /* @noEscape */ echo $code; ?>');
141+
order.addExcludedPaymentMethod('<?= /* @noEscape */ $code ?>');
142142

143143
<?php if (!$block->isAjaxRequest()): ?>
144144
document.observe('dom:loaded', function(){
145145
<?php endif; ?>
146146

147147
directPostModel = new directPost(
148-
'<?php /* @noEscape */ echo $code; ?>',
148+
'<?= /* @noEscape */ $code ?>',
149149
'directpost-iframe',
150-
'<?php /* @noEscape */ echo $controller; ?>',
151-
'<?php /* @noEscape */ echo $orderUrl; ?>',
150+
'<?= /* @noEscape */ $controller ?>',
151+
'<?= /* @noEscape */ $orderUrl ?>',
152152
'<?= $block->escapeUrl($method->getCgiUrl()) ?>',
153153
'<?= $block->escapeUrl($block->getUrl('*/*/save', [
154154
'_secure' => $block->getRequest()->isSecure()

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class="search-global-input"
1818
id="search-global"
1919
name="query"
20-
data-mage-init='<?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()) ?>'>
20+
data-mage-init='<?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()) ?>'>
2121
<button
2222
type="submit"
2323
class="search-global-action"

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ $numColumns = sizeof($block->getColumns());
269269
registry.get('<?= /* @escapeNotVerified */ $block->getDependencyJsObject() ?>', function (<?= /* @escapeNotVerified */ $block->getDependencyJsObject() ?>) {
270270
<?php endif; ?>
271271

272-
<?= /* @escapeNotVerified */ $block->getJsObjectName() ?> = new varienGrid(<?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getId()) ?>, '<?= /* @escapeNotVerified */ $block->getGridUrl() ?>', '<?= /* @escapeNotVerified */ $block->getVarNamePage() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameSort() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameDir() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameFilter() ?>');
272+
<?= /* @escapeNotVerified */ $block->getJsObjectName() ?> = new varienGrid(<?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getId()) ?>, '<?= /* @escapeNotVerified */ $block->getGridUrl() ?>', '<?= /* @escapeNotVerified */ $block->getVarNamePage() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameSort() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameDir() ?>', '<?= /* @escapeNotVerified */ $block->getVarNameFilter() ?>');
273273
<?= /* @escapeNotVerified */ $block->getJsObjectName() ?>.useAjax = '<?= /* @escapeNotVerified */ $block->getUseAjax() ?>';
274274
<?php if ($block->getRowClickCallback()): ?>
275275
<?= /* @escapeNotVerified */ $block->getJsObjectName() ?>.rowClickCallback = <?= /* @escapeNotVerified */ $block->getRowClickCallback() ?>;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ $code = $block->escapeHtml($block->getMethodCode());
1212
$ccType = $block->getInfoData('cc_type');
1313
?>
1414
<fieldset class="admin__fieldset payment-method"
15-
id="payment_form_<?php /* @noEscape */ echo $code; ?>"
15+
id="payment_form_<?= /* @noEscape */ $code ?>"
1616
style="display:none"
1717
>
1818
<div class="admin__field _required">
19-
<label class="label admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_cc_type" >
19+
<label class="label admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_type" >
2020
<span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
2121
</label>
2222
<div class="admin__field-control control">
23-
<select id="<?php /* @noEscape */ echo $code; ?>_cc_type" name="payment[cc_type]"
23+
<select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
2424
class="required-entry select admin__control-select validate-cc-type-select">
2525
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
2626
<option value="<?= $block->escapeHtml($typeCode) ?>"
@@ -36,7 +36,7 @@ $ccType = $block->getInfoData('cc_type');
3636
<span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
3737
</label>
3838
<div class="admin__field-control control">
39-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_number" class="admin__control-text hosted-control">
39+
<div id="<?= /* @noEscape */ $code ?>_cc_number" class="admin__control-text hosted-control">
4040
<span class="icon-type"></span>
4141
</div>
4242
<div class="hosted-error">
@@ -51,10 +51,10 @@ $ccType = $block->getInfoData('cc_type');
5151
</label>
5252
<div class="admin__field-control control">
5353
<div class="hosted-date-wrap">
54-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_month"
54+
<div id="<?= /* @noEscape */ $code ?>_cc_exp_month"
5555
class="admin__control-text hosted-control hosted-date"></div>
5656

57-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_year"
57+
<div id="<?= /* @noEscape */ $code ?>_cc_exp_year"
5858
class="admin__control-text hosted-control hosted-date"></div>
5959

6060
<div class="hosted-error"><?= $block->escapeHtml(__('Please, enter valid Expiration Date')) ?></div>
@@ -67,7 +67,7 @@ $ccType = $block->getInfoData('cc_type');
6767
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
6868
</label>
6969
<div class="admin__field-control control">
70-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_cid"
70+
<div id="<?= /* @noEscape */ $code ?>_cc_cid"
7171
class="admin__control-text hosted-control hosted-cid"></div>
7272

7373
<div class="hosted-error">
@@ -80,16 +80,16 @@ $ccType = $block->getInfoData('cc_type');
8080
<?php if($block->isVaultEnabled()): ?>
8181
<div class="field-tooltip-content">
8282
<input type="checkbox"
83-
id="<?php /* @noEscape */ echo $code; ?>_vault"
83+
id="<?= /* @noEscape */ $code ?>_vault"
8484
name="payment[is_active_payment_token_enabler]"
8585
class="admin__control-checkbox"/>
86-
<label class="label" for="<?php /* @noEscape */ echo $code; ?>_vault">
86+
<label class="label" for="<?= /* @noEscape */ $code ?>_vault">
8787
<span><?= $block->escapeHtml('Save for later use.') ?></span>
8888
</label>
8989
</div>
9090
<?php endif; ?>
9191

92-
<input type="hidden" id="<?php /* @noEscape */ echo $code; ?>_payment_method_nonce"
92+
<input type="hidden" id="<?= /* @noEscape */ $code ?>_payment_method_nonce"
9393
name="payment[payment_method_nonce]"/>
9494
<input type="submit" name="Submit" style="display: none;">
9595
</fieldset>

app/code/Magento/Braintree/view/adminhtml/templates/form/paypal/vault.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ $id = $block->escapeHtml($block->getData('id'));
1313
?>
1414
<div data-mage-init='{
1515
"Magento_Braintree/js/vault": {
16-
"container": "payment_<?php /* @noEscape */ echo $id; ?>",
16+
"container": "payment_<?= /* @noEscape */ $id ?>",
1717
"publicHash": "<?= $block->escapeHtml($block->getData(TokenUiComponentProviderInterface::COMPONENT_PUBLIC_HASH)) ?>",
1818
"code": "<?= $block->escapeHtml($block->getData('code')) ?>",
1919
"nonceUrl": "<?= $block->escapeUrl($block->getData('nonceUrl')) ?>"
2020
}
21-
}' id="payment_<?php /* @noEscape */ echo $id;?>" class="admin__field">
21+
}' id="payment_<?= /* @noEscape */ $id ?>" class="admin__field">
2222
<div class="admin__field-control control">
23-
<input type="radio" id="token_switcher_<?php /* @noEscape */ echo $id; ?>" name="payment[token_switcher]"/>
23+
<input type="radio" id="token_switcher_<?= /* @noEscape */ $id ?>" name="payment[token_switcher]"/>
2424
<img src="<?= $block->escapeUrl($icon['url']) ?>"
2525
width="<?= $block->escapeHtml($icon['width']) ?>"
2626
height="<?= $block->escapeHtml($icon['height']) ?>"

app/code/Magento/Braintree/view/adminhtml/templates/form/vault.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ $id = $block->escapeHtml($block->getData('id'));
1313
?>
1414
<div data-mage-init='{
1515
"Magento_Braintree/js/vault": {
16-
"container": "payment_<?php /* @noEscape */ echo $id; ?>",
16+
"container": "payment_<?= /* @noEscape */ $id ?>",
1717
"publicHash": "<?= $block->escapeHtml($block->getData(TokenUiComponentProviderInterface::COMPONENT_PUBLIC_HASH)) ?>",
1818
"code": "<?= $block->escapeHtml($block->getData('code')) ?>",
1919
"nonceUrl": "<?= $block->escapeUrl($block->getData('nonceUrl')) ?>"
2020
}
21-
}' id="payment_<?php /* @noEscape */ echo $id;?>" class="admin__field">
21+
}' id="payment_<?= /* @noEscape */ $id ?>" class="admin__field">
2222
<div class="admin__field-control control">
23-
<input type="radio" id="token_switcher_<?php /* @noEscape */ echo $id; ?>" name="payment[token_switcher]"/>
23+
<input type="radio" id="token_switcher_<?= /* @noEscape */ $id ?>" name="payment[token_switcher]"/>
2424
<img src="<?= $block->escapeUrl($icon['url']) ?>"
2525
width="<?= $block->escapeHtml($icon['width']) ?>"
2626
height="<?= $block->escapeHtml($icon['height']) ?>"

app/code/Magento/Braintree/view/adminhtml/templates/payment/script.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ $code = $block->escapeHtml($block->getCode());
1717
'jquery',
1818
'domReady!'
1919
], function(Braintree, $) {
20-
var config = <?php /* @noEscape */ echo $block->getPaymentConfig(); ?>,
20+
var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
2121
payment,
22-
form = $('#payment_form_<?php /* @noEscape */ echo $code; ?>');
22+
form = $('#payment_form_<?= /* @noEscape */ $code ?>');
2323

2424
config.active = form.length > 0 && !form.is(':hidden');
2525
payment = new Braintree(config);

app/code/Magento/Braintree/view/frontend/templates/paypal/button.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ $config = [
2020
];
2121

2222
?>
23-
<div data-mage-init='<?php /* @noEscape */ echo json_encode($config); ?>'
23+
<div data-mage-init='<?= /* @noEscape */ json_encode($config) ?>'
2424
class="paypal checkout paypal-logo braintree-paypal-logo<?php
2525
/* @noEscape */ echo $block->getContainerId(); ?>-container">
26-
<button data-currency="<?php /* @noEscape */ echo $block->getCurrency(); ?>"
27-
data-locale="<?php /* @noEscape */ echo $block->getLocale(); ?>"
28-
data-amount="<?php /* @noEscape */ echo $block->getAmount(); ?>"
29-
id="<?php /* @noEscape */ echo $id; ?>"
26+
<button data-currency="<?= /* @noEscape */ $block->getCurrency() ?>"
27+
data-locale="<?= /* @noEscape */ $block->getLocale() ?>"
28+
data-amount="<?= /* @noEscape */ $block->getAmount() ?>"
29+
id="<?= /* @noEscape */ $id ?>"
3030
class="action-braintree-paypal-logo" disabled>
3131
<img class="braintree-paypal-button-hidden"
3232
src="https://checkout.paypal.com/pwpp/2.17.6/images/pay-with-paypal.png"

app/code/Magento/Braintree/view/frontend/templates/paypal/vault_token.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ $confirmDeleteMessage = sprintf('%s: %s?', __('Are you sure you want to delete t
1414
?>
1515
<tr>
1616
<td data-th="<?= $block->escapeHtml(__('PayPal Account')) ?>" class="col paypal-account">
17-
<img src="<?php /* @noEscape */ echo $block->getIconUrl(); ?>"
18-
width="<?php /* @noEscape */ echo $block->getIconWidth(); ?>"
19-
height="<?php /* @noEscape */ echo $block->getIconHeight(); ?>"
17+
<img src="<?= /* @noEscape */ $block->getIconUrl() ?>"
18+
width="<?= /* @noEscape */ $block->getIconWidth() ?>"
19+
height="<?= /* @noEscape */ $block->getIconHeight() ?>"
2020
alt="<?= $block->escapeHtml(__('PayPal Logo')) ?>">
2121
<span><?= $block->escapeHtml($payerEmail) ?></span>
2222
</td>
@@ -27,8 +27,8 @@ $confirmDeleteMessage = sprintf('%s: %s?', __('Are you sure you want to delete t
2727
method="post">
2828
<?= $block->getBlockHtml('formkey') ?>
2929
<input
30-
name="<?php /* @noEscape */ echo PaymentTokenInterface::PUBLIC_HASH; ?>"
31-
value="<?php /* @noEscape */ echo $block->getToken()->getPublicHash(); ?>"
30+
name="<?= /* @noEscape */ PaymentTokenInterface::PUBLIC_HASH ?>"
31+
value="<?= /* @noEscape */ $block->getToken()->getPublicHash() ?>"
3232
type="hidden"/>
3333
<button type="submit"
3434
class="action delete"

0 commit comments

Comments
 (0)