Skip to content

Commit 781717c

Browse files
committed
MC-16421: Сomments history for the order does not show correctly "euro" symbol
1 parent c2e450f commit 781717c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/code/Magento/Sales/Helper/Admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
165165

166166
$internalErrors = libxml_use_internal_errors(true);
167167

168+
$data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
168169
$domDocument->loadHTML(
169170
'<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>'
170171
);

dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ public function escapeHtmlWithLinksDataProvider(): array
5252
'&lt;a&gt;some text in tags&lt;/a&gt;',
5353
'allowedTags' => null,
5454
],
55+
[
56+
// @codingStandardsIgnoreStart
57+
'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"',
58+
'Authorized amount of €30.00. Transaction ID: &quot;<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&amp;id=123456789QWERTY">123456789QWERTY</a>&quot;',
59+
// @codingStandardsIgnoreEnd
60+
'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'],
61+
],
5562
[
5663
'Transaction ID: "<a target="_blank" href="https://www.paypal.com/?id=XX123XX">XX123XX</a>"',
5764
'Transaction ID: &quot;<a href="https://www.paypal.com/?id=XX123XX">XX123XX</a>&quot;',

0 commit comments

Comments
 (0)