Skip to content

Commit 7eb14c6

Browse files
committed
Merge remote-tracking branch 'origin/MC-14826' into borg-qwerty-2.3
2 parents a1d6f78 + 81397bd commit 7eb14c6

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

app/code/Magento/Customer/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@
280280
</field>
281281
<field id="html" translate="label" type="textarea" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
282282
<label>HTML</label>
283+
<comment>Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed</comment>
283284
</field>
284285
<field id="pdf" translate="label" type="textarea" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
285286
<label>PDF</label>

app/code/Magento/Customer/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ Strong,Strong
500500
"Address Templates","Address Templates"
501501
"Online Customers Options","Online Customers Options"
502502
"Online Minutes Interval","Online Minutes Interval"
503+
"Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed","Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed"
503504
"Leave empty for default (15 minutes).","Leave empty for default (15 minutes)."
504505
"Customer Notification","Customer Notification"
505506
"Customer Grid","Customer Grid"

app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $lastLoginDateStore = $block->getStoreLastLoginDate();
1313

1414
$createDateAdmin = $block->getCreateDate();
1515
$createDateStore = $block->getStoreCreateDate();
16+
$allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul'];
1617
?>
1718
<div class="fieldset-wrapper customer-information">
1819
<div class="fieldset-wrapper-title">
@@ -61,7 +62,7 @@ $createDateStore = $block->getStoreCreateDate();
6162
</table>
6263
<address>
6364
<strong><?= $block->escapeHtml(__('Default Billing Address')) ?></strong><br/>
64-
<?= $block->getBillingAddressHtml() ?>
65+
<?= $block->escapeHtml($block->getBillingAddressHtml(), $allowedAddressHtmlTags) ?>
6566
</address>
6667

6768
</div>

app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ $orderStoreDate = $block->formatDate(
2626
);
2727

2828
$customerUrl = $block->getCustomerViewUrl();
29+
$allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul'];
2930
?>
3031

3132
<section class="admin__page-section order-view-account-information">
@@ -171,7 +172,7 @@ $customerUrl = $block->getCustomerViewUrl();
171172
<span class="title"><?= $block->escapeHtml(__('Billing Address')) ?></span>
172173
<div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getBillingAddress()); ?></div>
173174
</div>
174-
<address class="admin__page-section-item-content"><?= /* @noEscape */ $block->getFormattedAddress($order->getBillingAddress()); ?></address>
175+
<address class="admin__page-section-item-content"><?= $block->escapeHtml($block->getFormattedAddress($order->getBillingAddress()), $allowedAddressHtmlTags); ?></address>
175176
</div>
176177
<?php if (!$block->getOrder()->getIsVirtual()): ?>
177178
<div class="admin__page-section-item order-shipping-address">
@@ -180,7 +181,7 @@ $customerUrl = $block->getCustomerViewUrl();
180181
<span class="title"><?= $block->escapeHtml(__('Shipping Address')) ?></span>
181182
<div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getShippingAddress()); ?></div>
182183
</div>
183-
<address class="admin__page-section-item-content"><?= /* @noEscape */ $block->getFormattedAddress($order->getShippingAddress()); ?></address>
184+
<address class="admin__page-section-item-content"><?= $block->escapeHtml($block->getFormattedAddress($order->getShippingAddress()), $allowedAddressHtmlTags); ?></address>
184185
</div>
185186
<?php endif; ?>
186187
</div>

0 commit comments

Comments
 (0)