mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
Correctly split long subject lines according to the used RFC. This fixes extra spaces within long subjects. (Bug #43715)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9430 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2155bbbf8a
commit
d7a8d7ad09
@ -136,6 +136,7 @@
|
||||
<li>[Fix] Prevent incomplete backups stored if option "store and download" is selected and admin cancel download by removing the option. (Bug #20325)</li>
|
||||
<li>[Fix] Enforce correct case for template variables</li>
|
||||
<li>[Fix] Set topic_last_view_time on post/reply/edit to circumvent race conditions in auto prune and false removal of topics for manual forum prune (Bug #18055, #43515)</li>
|
||||
<li>[Fix] Correctly split long subject lines according to the used RFC. This fixes extra spaces within long subjects. (Bug #43715)</li>
|
||||
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
|
||||
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
|
||||
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
|
||||
|
@ -1446,9 +1446,10 @@ function mail_encode($str)
|
||||
// define start delimimter, end delimiter and spacer
|
||||
$start = "=?UTF-8?B?";
|
||||
$end = "?=";
|
||||
$spacer = $end . ' ' . $start;
|
||||
$split_length = 64;
|
||||
$delimiter = "\r\n ";
|
||||
|
||||
// Maximum length is 75 for everything. 75 - length of start/end/delimiter == 63
|
||||
$split_length = 63;
|
||||
$encoded_str = base64_encode($str);
|
||||
|
||||
// If encoded string meets the limits, we just return with the correct data.
|
||||
@ -1460,7 +1461,7 @@ function mail_encode($str)
|
||||
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
|
||||
if (strlen($str) === utf8_strlen($str))
|
||||
{
|
||||
return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end;
|
||||
return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
|
||||
}
|
||||
|
||||
// UTF-8 data, compose encoded lines
|
||||
@ -1476,10 +1477,10 @@ function mail_encode($str)
|
||||
$text .= array_shift($array);
|
||||
}
|
||||
|
||||
$str .= $start . base64_encode($text) . $end . ' ';
|
||||
$str .= $start . base64_encode($text) . $end . $delimiter;
|
||||
}
|
||||
|
||||
return substr($str, 0, -1);
|
||||
return substr($str, 0, -strlen($delimiter));
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user