mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Strip more Mailbox signatures
Summary: Saw this variant in a thread. Test Plan: Unit tests. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D12349
This commit is contained in:
parent
15b41f5639
commit
3c6c6552d3
2 changed files with 11 additions and 2 deletions
|
@ -135,9 +135,11 @@ final class PhabricatorMetaMTAEmailBodyParser {
|
|||
$body);
|
||||
|
||||
// Mailbox seems to make an attempt to comply with the "standard" but
|
||||
// omits the leading newline and uses an em dash?
|
||||
// omits the leading newline and uses an em dash. This may or may not have
|
||||
// the trailing space, but it's unique enough that there's no real ambiguity
|
||||
// in detecting it.
|
||||
$body = preg_replace(
|
||||
"/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su",
|
||||
"/\s*\xE2\x80\x94\s*\nSent from Mailbox\s*\z/su",
|
||||
'',
|
||||
$body);
|
||||
|
||||
|
|
|
@ -246,6 +246,13 @@ EOMAIL
|
|||
<<<EOMAIL
|
||||
OKAY {$emdash}{$trailing_space}
|
||||
Sent from Mailbox
|
||||
EOMAIL
|
||||
,
|
||||
<<<EOMAIL
|
||||
OKAY
|
||||
|
||||
{$emdash}
|
||||
Sent from Mailbox
|
||||
EOMAIL
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue