mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 23:59:41 +02:00
MDL-12524 fixed quoting of phrases in mail header (problem with special chars in names of users); merged from MOODLE_19_STABLE
This commit is contained in:
parent
636b8f19cb
commit
5730323b4b
1 changed files with 7 additions and 3 deletions
|
@ -1192,9 +1192,13 @@ class PHPMailer
|
|||
|
||||
/// Start Moodle Hack - do our own multibyte-safe header encoding
|
||||
$textlib = textlib_get_instance();
|
||||
$result = $textlib->encode_mimeheader($str, $this->CharSet);
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
$encoded = $textlib->encode_mimeheader($str, $this->CharSet);
|
||||
if ($encoded !== false) {
|
||||
$encoded = str_replace("\n", $this->LE, $encoded);
|
||||
if ($position == 'phrase') {
|
||||
return ("\"$encoded\"");
|
||||
}
|
||||
return $encoded;
|
||||
}
|
||||
// try the old way that does not handle binary-safe line splitting in mime header
|
||||
/// End Moodle Hack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue