Skip to content

Commit f44f09b

Browse files
author
Hwashiang Yu
committed
Merge remote-tracking branch 'origin/MC-16003' into HEAD
2 parents f29fe48 + 30ae3a8 commit f44f09b

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,11 @@ public function getHintHtml()
586586
$html = '';
587587
$url = $this->getHintUrl();
588588
if ($url) {
589-
$html = '<div class="admin__field-tooltip tooltip">' . '<a' . ' href="' . $this->escapeUrl(
590-
$url
591-
) . '"' . ' onclick="this.target=\'_blank\'"' . ' title="' . __(
592-
'What is this?'
593-
) . '"' . ' class="admin__field-tooltip-action action-help"><span>' . __(
594-
'What is this?'
595-
) . '</span></a>' . ' </div>';
589+
$html = '<div class="admin__field-tooltip tooltip"><a href="%s" onclick="this.target=\'_blank\'" title="%s"
590+
class="admin__field-tooltip-action action-help"><span>%s</span></a></span></div>';
591+
$title = $this->escapeHtmlAttr(__('What is this?'));
592+
$span= $this->escapeHtml(__('What is this?'));
593+
sprintf($html, $this->escapeUrl($url), $title, $span);
596594
}
597595
return $html;
598596
}

app/code/Magento/Customer/Block/Account/Dashboard/Address.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Customer\Block\Account\Dashboard;
78

89
use Magento\Customer\Api\Data\AddressInterface;
@@ -104,17 +105,19 @@ public function getPrimaryBillingAddressHtml()
104105
try {
105106
$address = $this->currentCustomerAddress->getDefaultBillingAddress();
106107
} catch (NoSuchEntityException $e) {
107-
return __('You have not set a default billing address.');
108+
return $this->escapeHtml(__('You have not set a default billing address.'));
108109
}
109110

110111
if ($address) {
111112
return $this->_getAddressHtml($address);
112113
} else {
113-
return __('You have not set a default billing address.');
114+
return $this->escapeHtml(__('You have not set a default billing address.'));
114115
}
115116
}
116117

117118
/**
119+
* Get Primary Shipping Address Edit Url
120+
*
118121
* @return string
119122
*/
120123
public function getPrimaryShippingAddressEditUrl()
@@ -132,6 +135,8 @@ public function getPrimaryShippingAddressEditUrl()
132135
}
133136

134137
/**
138+
* Get Primary Billing Address Edit Url
139+
*
135140
* @return string
136141
*/
137142
public function getPrimaryBillingAddressEditUrl()
@@ -149,6 +154,8 @@ public function getPrimaryBillingAddressEditUrl()
149154
}
150155

151156
/**
157+
* Get Address Book Url
158+
*
152159
* @return string
153160
*/
154161
public function getAddressBookUrl()

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfo.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
78

89
use Magento\Customer\Api\AccountManagementInterface;
@@ -314,11 +315,11 @@ public function getBillingAddressHtml()
314315
try {
315316
$address = $this->accountManagement->getDefaultBillingAddress($this->getCustomer()->getId());
316317
} catch (NoSuchEntityException $e) {
317-
return __('The customer does not have default billing address.');
318+
return $this->escapeHtml(__('The customer does not have default billing address.'));
318319
}
319320

320321
if ($address === null) {
321-
return __('The customer does not have default billing address.');
322+
return $this->escapeHtml(__('The customer does not have default billing address.'));
322323
}
323324

324325
return $this->addressHelper->getFormatTypeRenderer(

app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function getAddButtonHtml()
180180
\Magento\Backend\Block\Widget\Button::class
181181
)->setData(
182182
[
183-
'label' => __('Add New Link'),
183+
'label' => $this->escapeHtmlAttr(__('Add New Link')),
184184
'id' => 'add_link_item',
185185
'class' => 'action-add',
186186
'data_attribute' => ['action' => 'add-link'],

app/code/Magento/Shipping/Block/Items.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Magento\Shipping\Block;
1313

1414
/**
15+
* Shipping Items Block
16+
*
1517
* @api
1618
* @since 100.0.2
1719
*/
@@ -49,6 +51,8 @@ public function getOrder()
4951
}
5052

5153
/**
54+
* Get Print Shipment Url
55+
*
5256
* @param object $shipment
5357
* @return string
5458
*/
@@ -58,6 +62,8 @@ public function getPrintShipmentUrl($shipment)
5862
}
5963

6064
/**
65+
* Get Print All Shipments Url
66+
*
6167
* @param object $order
6268
* @return string
6369
*/
@@ -77,7 +83,7 @@ public function getCommentsHtml($shipment)
7783
$html = '';
7884
$comments = $this->getChildBlock('shipment_comments');
7985
if ($comments) {
80-
$comments->setEntity($shipment)->setTitle(__('About Your Shipment'));
86+
$comments->setEntity($shipment)->setTitle($this->escapeHtml(__('About Your Shipment')));
8187
$html = $comments->toHtml();
8288
}
8389
return $html;

0 commit comments

Comments
 (0)