Merge pull request #6402 from marc1706/ticket/16932

[ticket/16932] Ensure special characters are encoded for ASCII in emails
This commit is contained in:
Marc Alexander 2022-07-16 18:39:02 -04:00
commit 5cdd22e058
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -1882,7 +1882,7 @@ function mail_encode($str, $eol = "\r\n")
{
$encoded_char = $is_quoted_printable
? $char = preg_replace_callback(
'/[=_\?\x20\x00-\x1F\x80-\xFF]/',
'/[()<>@,;:\\\\".\[\]=_?\x20\x00-\x1F\x80-\xFF]/',
function ($matches)
{
$hex = dechex(ord($matches[0]));