mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Implement a complement for Usenet Signature Convention, in order to remove
signature part from reply to message
This commit is contained in:
parent
134f0db1b9
commit
c6cd5ea8db
@ -2222,9 +2222,20 @@ class mail_compose
|
|||||||
#error_log( "GetReplyData (Plain) CharSet:".mb_detect_encoding($bodyParts[$i]['body'] . 'a' , strtoupper($bodyParts[$i]['charSet']).','.strtoupper($this->displayCharset).',UTF-8, ISO-8859-1'));
|
#error_log( "GetReplyData (Plain) CharSet:".mb_detect_encoding($bodyParts[$i]['body'] . 'a' , strtoupper($bodyParts[$i]['charSet']).','.strtoupper($this->displayCharset).',UTF-8, ISO-8859-1'));
|
||||||
$newBody = mail_ui::resolve_inline_images($newBody2, $_folder, $_uid, $_partID, 'plain');
|
$newBody = mail_ui::resolve_inline_images($newBody2, $_folder, $_uid, $_partID, 'plain');
|
||||||
$this->sessionData['body'] .= "\r\n";
|
$this->sessionData['body'] .= "\r\n";
|
||||||
|
$hasSignature = false;
|
||||||
// create body new, with good line breaks and indention
|
// create body new, with good line breaks and indention
|
||||||
foreach(explode("\n",$newBody) as $value) {
|
foreach(explode("\n",$newBody) as $value) {
|
||||||
// the explode is removing the character
|
// the explode is removing the character
|
||||||
|
//$value .= 'ee';
|
||||||
|
|
||||||
|
// Try to remove signatures from qouted parts to avoid multiple
|
||||||
|
// signatures problem in reply (rfc3676#section-4.3).
|
||||||
|
if ($hasSignature || ($hasSignature = preg_match("/\G--(\s|\s[\r\n])$/",$value)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($hasSignature) continue;
|
||||||
if (trim($value) != '') {
|
if (trim($value) != '') {
|
||||||
#if ($value != "\r") $value .= "\n";
|
#if ($value != "\r") $value .= "\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user