Skip to content

Commit fcd1929

Browse files
committed
AC-7422:Incompatible issues fix for PHP8.2
1 parent da3fa89 commit fcd1929

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
166166

167167
$internalErrors = libxml_use_internal_errors(true);
168168

169-
$data = htmlentities($data, ENT_QUOTES | ENT_IGNORE, 'UTF-8', false);
169+
$data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES , 'ISO-8859-1');
170+
170171
$domDocument->loadHTML(
171172
'<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>'
172173
);

dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void
5656

5757
$this->reloadProductPriceInfo();
5858
$this->localeResolver->setLocale('uk_UA');
59-
$this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore');
59+
$this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore');
6060
}
6161

6262
/**
@@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void
8080

8181
$this->reloadProductPriceInfo();
8282
$this->localeResolver->setLocale('uk_UA');
83-
$this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore');
83+
$this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore');
8484
}
8585

8686
/**
@@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void
111111
$this->localeResolver->setLocale('uk_UA');
112112
$this->assertProductStorePrice(
113113
'simple-product-tax-none',
114-
'Buy 2 for 960,00  each and save 80%',
114+
'Buy 2 for 960,00  each and save 80%',
115115
'fixturestore',
116116
self::TIER_PRICE_BLOCK_NAME
117117
);

lib/internal/Magento/Framework/Escaper.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class Escaper
1717
{
1818
/**
19-
* @var ENT_QUOTES | ENT_SUBSTITUTE
19+
* HTML special characters flag
2020
*/
2121
private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE;
2222

@@ -96,7 +96,7 @@ function ($errorNumber, $errorString) {
9696
}
9797
);
9898
$data = $this->prepareUnescapedCharacters($data);
99-
$string = html_entity_decode($data, ENT_QUOTES, 'UTF-8');
99+
$string = @iconv("UTF-8","ISO-8859-1//IGNORE", $data);
100100
try {
101101
$domDocument->loadHTML(
102102
'<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>'
@@ -346,7 +346,6 @@ public function escapeCss($string)
346346
* @param string $quote
347347
* @return string|array
348348
* @deprecated 101.0.0
349-
* @see 6729b6e01368248abc33300208eb292c95050203
350349
*/
351350
public function escapeJsQuote($data, $quote = '\'')
352351
{
@@ -367,7 +366,6 @@ public function escapeJsQuote($data, $quote = '\'')
367366
* @param string $data
368367
* @return string
369368
* @deprecated 101.0.0
370-
* @see 6729b6e01368248abc33300208eb292c95050203
371369
*/
372370
public function escapeXssInUrl($data)
373371
{
@@ -416,7 +414,6 @@ private function escapeScriptIdentifiers(string $data): string
416414
* @param bool $addSlashes
417415
* @return string
418416
* @deprecated 101.0.0
419-
* @see 6729b6e01368248abc33300208eb292c95050203
420417
*/
421418
public function escapeQuote($data, $addSlashes = false)
422419
{
@@ -431,7 +428,6 @@ public function escapeQuote($data, $addSlashes = false)
431428
*
432429
* @return \Magento\Framework\ZendEscaper
433430
* @deprecated 101.0.0
434-
* @see 6729b6e01368248abc33300208eb292c95050203
435431
*/
436432
private function getEscaper()
437433
{
@@ -447,7 +443,6 @@ private function getEscaper()
447443
*
448444
* @return \Psr\Log\LoggerInterface
449445
* @deprecated 101.0.0
450-
* @see 6729b6e01368248abc33300208eb292c95050203
451446
*/
452447
private function getLogger()
453448
{

0 commit comments

Comments
 (0)