File tree Expand file tree Collapse file tree 5 files changed +25
-13
lines changed
Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable Expand file tree Collapse file tree 5 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -586,13 +586,11 @@ public function getHintHtml()
586
586
$ html = '' ;
587
587
$ url = $ this ->getHintUrl ();
588
588
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 );
596
594
}
597
595
return $ html ;
598
596
}
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
6
7
namespace Magento \Customer \Block \Account \Dashboard ;
7
8
8
9
use Magento \Customer \Api \Data \AddressInterface ;
@@ -104,17 +105,19 @@ public function getPrimaryBillingAddressHtml()
104
105
try {
105
106
$ address = $ this ->currentCustomerAddress ->getDefaultBillingAddress ();
106
107
} 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. ' ) );
108
109
}
109
110
110
111
if ($ address ) {
111
112
return $ this ->_getAddressHtml ($ address );
112
113
} else {
113
- return __ ('You have not set a default billing address. ' );
114
+ return $ this -> escapeHtml ( __ ('You have not set a default billing address. ' ) );
114
115
}
115
116
}
116
117
117
118
/**
119
+ * Get Primary Shipping Address Edit Url
120
+ *
118
121
* @return string
119
122
*/
120
123
public function getPrimaryShippingAddressEditUrl ()
@@ -132,6 +135,8 @@ public function getPrimaryShippingAddressEditUrl()
132
135
}
133
136
134
137
/**
138
+ * Get Primary Billing Address Edit Url
139
+ *
135
140
* @return string
136
141
*/
137
142
public function getPrimaryBillingAddressEditUrl ()
@@ -149,6 +154,8 @@ public function getPrimaryBillingAddressEditUrl()
149
154
}
150
155
151
156
/**
157
+ * Get Address Book Url
158
+ *
152
159
* @return string
153
160
*/
154
161
public function getAddressBookUrl ()
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
6
7
namespace Magento \Customer \Block \Adminhtml \Edit \Tab \View ;
7
8
8
9
use Magento \Customer \Api \AccountManagementInterface ;
@@ -314,11 +315,11 @@ public function getBillingAddressHtml()
314
315
try {
315
316
$ address = $ this ->accountManagement ->getDefaultBillingAddress ($ this ->getCustomer ()->getId ());
316
317
} 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. ' ) );
318
319
}
319
320
320
321
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. ' ) );
322
323
}
323
324
324
325
return $ this ->addressHelper ->getFormatTypeRenderer (
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ public function getAddButtonHtml()
180
180
\Magento \Backend \Block \Widget \Button::class
181
181
)->setData (
182
182
[
183
- 'label ' => __ ('Add New Link ' ),
183
+ 'label ' => $ this -> escapeHtmlAttr ( __ ('Add New Link ' ) ),
184
184
'id ' => 'add_link_item ' ,
185
185
'class ' => 'action-add ' ,
186
186
'data_attribute ' => ['action ' => 'add-link ' ],
Original file line number Diff line number Diff line change 12
12
namespace Magento \Shipping \Block ;
13
13
14
14
/**
15
+ * Shipping Items Block
16
+ *
15
17
* @api
16
18
* @since 100.0.2
17
19
*/
@@ -49,6 +51,8 @@ public function getOrder()
49
51
}
50
52
51
53
/**
54
+ * Get Print Shipment Url
55
+ *
52
56
* @param object $shipment
53
57
* @return string
54
58
*/
@@ -58,6 +62,8 @@ public function getPrintShipmentUrl($shipment)
58
62
}
59
63
60
64
/**
65
+ * Get Print All Shipments Url
66
+ *
61
67
* @param object $order
62
68
* @return string
63
69
*/
@@ -77,7 +83,7 @@ public function getCommentsHtml($shipment)
77
83
$ html = '' ;
78
84
$ comments = $ this ->getChildBlock ('shipment_comments ' );
79
85
if ($ comments ) {
80
- $ comments ->setEntity ($ shipment )->setTitle (__ ('About Your Shipment ' ));
86
+ $ comments ->setEntity ($ shipment )->setTitle ($ this -> escapeHtml ( __ ('About Your Shipment ' ) ));
81
87
$ html = $ comments ->toHtml ();
82
88
}
83
89
return $ html ;
You can’t perform that action at this time.
0 commit comments