Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2021-11-03 20:07:14 +01:00
commit 1bec99c501
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -1866,7 +1866,8 @@ function mail_encode($str, $eol = "\r\n")
$split_length = $split_length - $split_length % 4;
// Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
$encoded_str = $is_ascii ? quoted_printable_encode($str) : base64_encode($str);
// quoted_printable_encode() splits lines at length of 75 characters with =\r\n delimiter, amend this feature
$encoded_str = $is_ascii ? str_replace("=\r\n", '', quoted_printable_encode($str)) : base64_encode($str);
// If encoded string meets the limits, we just return with the correct data.
if (strlen($encoded_str) <= $split_length)