Skip to content

Commit dedea8c

Browse files
committed
Merge remote-tracking branch 'origin/MC-18252' into 2.3-develop-pr59
2 parents d0d92bd + 8628261 commit dedea8c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/internal/Magento/Framework/Escaper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function escapeJsQuote($data, $quote = '\'')
320320
public function escapeXssInUrl($data)
321321
{
322322
return htmlspecialchars(
323-
$this->escapeScriptIdentifiers((string)$data),
323+
$this->escapeScriptIdentifiers(html_entity_decode((string)$data)),
324324
$this->htmlSpecialCharsFlag | ENT_HTML5 | ENT_HTML401,
325325
'UTF-8',
326326
false

lib/internal/Magento/Framework/Test/Unit/EscaperTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ public function escapeUrlDataProvider(): array
293293
'data' => "http://exam\r\nple.com/search?term=this+%26+that&view=list",
294294
'expected' => "http://example.com/search?term=this+%26+that&view=list",
295295
],
296+
[
297+
'data' => "http://example.com/",
298+
'expected' => "http://example.com/",
299+
],
296300
];
297301
}
298302

0 commit comments

Comments
 (0)