|
|
@ -2341,8 +2341,10 @@ class rcube_imap
|
|
|
|
$pos = strpos($input, '=?');
|
|
|
|
$pos = strpos($input, '=?');
|
|
|
|
if ($pos !== false)
|
|
|
|
if ($pos !== false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// rfc: all line breaks or other characters not found in the Base64 Alphabet must be ignored by decoding software
|
|
|
|
// rfc: all line breaks or other characters not found
|
|
|
|
// delete all blanks between MIME-lines, differently we can receive unnecessary blanks and broken utf-8 symbols
|
|
|
|
// in the Base64 Alphabet must be ignored by decoding software
|
|
|
|
|
|
|
|
// delete all blanks between MIME-lines, differently we can
|
|
|
|
|
|
|
|
// receive unnecessary blanks and broken utf-8 symbols
|
|
|
|
$input = preg_replace("/\?=\s+=\?/", '?==?', $input);
|
|
|
|
$input = preg_replace("/\?=\s+=\?/", '?==?', $input);
|
|
|
|
|
|
|
|
|
|
|
|
$out = substr($input, 0, $pos);
|
|
|
|
$out = substr($input, 0, $pos);
|
|
|
@ -2361,7 +2363,8 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// no encoding information, use fallback
|
|
|
|
// no encoding information, use fallback
|
|
|
|
return rcube_charset_convert($input, !empty($fallback) ? $fallback : $this->default_charset);
|
|
|
|
return rcube_charset_convert($input,
|
|
|
|
|
|
|
|
!empty($fallback) ? $fallback : $GLOBALS['CONFIG']['default_charset']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|