Skip to content

Commit 9e1f803

Browse files
committed
Merge remote-tracking branch 'origin/MC-18475' into 2.2-develop-pr105
2 parents bd57c8f + c6ab7ac commit 9e1f803

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
@@ -292,6 +292,10 @@ public function escapeUrlDataProvider(): array
292292
'data' => "http://exam\r\nple.com/search?term=this+%26+that&view=list",
293293
'expected' => "http://example.com/search?term=this+%26+that&view=list",
294294
],
295+
[
296+
'data' => "http://example.com/",
297+
'expected' => "http://example.com/",
298+
],
295299
];
296300
}
297301

0 commit comments

Comments
 (0)