1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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:
epriestley 2015-04-11 08:52:33 -07:00
parent 15b41f5639
commit 3c6c6552d3
2 changed files with 11 additions and 2 deletions

View file

@ -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);

View file

@ -246,6 +246,13 @@ EOMAIL
<<<EOMAIL
OKAY {$emdash}{$trailing_space}
Sent from Mailbox
EOMAIL
,
<<<EOMAIL
OKAY
{$emdash}
Sent from Mailbox
EOMAIL
);
}