Skip to content

Commit 79b659d

Browse files
committed
[6.0] Fix emailToPunycode() throws "Prohibited input U+0000005C" with backslash before quote
Resolves #46356
1 parent 961dd0c commit 79b659d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/src/Filter/InputFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ public function emailToPunycode($text)
152152
if (preg_match_all($pattern, $text, $matches)) {
153153
foreach ($matches[0] as $match) {
154154
$match = (string) str_replace(['?', '"'], '', $match);
155-
$text = (string) str_replace($match, PunycodeHelper::emailToPunycode($match), $text);
155+
try {
156+
$text = (string) str_replace($match, PunycodeHelper::emailToPunycode($match), $text);
157+
} catch (\Exception) {}
156158
}
157159
}
158160

0 commit comments

Comments
 (0)