mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
do not process if all ASCII
git-svn-id: file:///svn/phpbb/trunk@6640 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5a73807c9b
commit
fbe7c6550b
1 changed files with 6 additions and 0 deletions
|
@ -1395,6 +1395,12 @@ function mail_encode($str, $compliant = true)
|
|||
return $start . $encoded_str . $end;
|
||||
}
|
||||
|
||||
// If there is only ASCII data, we just return what we want, no need to process.
|
||||
if (strlen($str) === utf8_strlen($str))
|
||||
{
|
||||
return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end;
|
||||
}
|
||||
|
||||
// What we do is encoding/decoding forth and back and checking
|
||||
// for a valid utf8 string to make sure no lines include half-baked data.
|
||||
$correct_encode = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue