Skip to content

Commit f2cf72c

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-98235' into borg-qwerty-2.1
2 parents 4943a53 + 234e517 commit f2cf72c

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
@@ -261,6 +261,7 @@
261261
</field>
262262
<field id="html" type="textarea" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
263263
<label>HTML</label>
264+
<comment>Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed</comment>
264265
</field>
265266
<field id="pdf" type="textarea" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
266267
<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
@@ -480,6 +480,7 @@ Password:,Password:
480480
"Address Templates","Address Templates"
481481
"Online Customers Options","Online Customers Options"
482482
"Online Minutes Interval","Online Minutes Interval"
483+
"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"
483484
"Leave empty for default (15 minutes).","Leave empty for default (15 minutes)."
484485
"Enable Autocomplete on login/forgot password forms","Enable Autocomplete on login/forgot password forms"
485486
"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
@@ -15,6 +15,7 @@ $lastLoginDateStore = $block->getStoreLastLoginDate();
1515

1616
$createDateAdmin = $block->getCreateDate();
1717
$createDateStore = $block->getStoreCreateDate();
18+
$allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul'];
1819
?>
1920

2021
<div class="fieldset-wrapper customer-information">
@@ -65,7 +66,7 @@ $createDateStore = $block->getStoreCreateDate();
6566
<address>
6667
<strong><?php echo $block->escapeHtml(__('Default Billing Address')) ?></strong>
6768
<br/>
68-
<?php echo $block->getBillingAddressHtml() ?>
69+
<?php echo $block->escapeHtml($block->getBillingAddressHtml(), $allowedAddressHtmlTags) ?>
6970
</address>
7071

7172
</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
@@ -24,6 +24,7 @@ $orderStoreDate = $block->formatDate(
2424
true,
2525
$block->getTimezoneForStore($order->getStore())
2626
);
27+
$allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul'];
2728
?>
2829

2930
<section class="admin__page-section order-view-account-information">
@@ -168,7 +169,7 @@ $orderStoreDate = $block->formatDate(
168169
<span class="title"><?php echo $block->escapeHtml(__('Billing Address')) ?></span>
169170
<div class="actions"><?php /* @noEscape */ echo $block->getAddressEditLink($order->getBillingAddress()); ?></div>
170171
</div>
171-
<address class="admin__page-section-item-content"><?php /* @noEscape */ echo $block->getFormattedAddress($order->getBillingAddress()); ?></address>
172+
<address class="admin__page-section-item-content"><?php echo $block->escapeHtml($block->getFormattedAddress($order->getBillingAddress()), $allowedAddressHtmlTags); ?></address>
172173
</div>
173174
<?php if (!$block->getOrder()->getIsVirtual()): ?>
174175
<div class="admin__page-section-item order-shipping-address">
@@ -177,7 +178,7 @@ $orderStoreDate = $block->formatDate(
177178
<span class="title"><?php echo $block->escapeHtml(__('Shipping Address')) ?></span>
178179
<div class="actions"><?php /* @noEscape */ echo $block->getAddressEditLink($order->getShippingAddress()); ?></div>
179180
</div>
180-
<address class="admin__page-section-item-content"><?php /* @noEscape */ echo $block->getFormattedAddress($order->getShippingAddress()); ?></address>
181+
<address class="admin__page-section-item-content"><?php echo $block->escapeHtml($block->getFormattedAddress($order->getShippingAddress()), $allowedAddressHtmlTags); ?></address>
181182
</div>
182183
<?php endif; ?>
183184
</div>

0 commit comments

Comments
 (0)