Strip GMail French quote header
Summary: Ref T8199. Add pattern matching for GMail French. Test Plan: - Switched Gmail to french. - Replied to some mail. - Extracted quoted text header. - Added and executed unit test. Reviewers: btrahan Reviewed By: btrahan Subscribers: tycho.tatitscheff, epriestley Maniphest Tasks: T8199 Differential Revision: https://secure.phabricator.com/D12845
This commit is contained in:
@@ -123,6 +123,12 @@ final class PhabricatorMetaMTAEmailBodyParser {
|
|||||||
'',
|
'',
|
||||||
$body);
|
$body);
|
||||||
|
|
||||||
|
// French GMail quoted text. See T8199.
|
||||||
|
$body = preg_replace(
|
||||||
|
'/^\s*\d{4}-\d{2}-\d{2} \d+:\d+ GMT.*:.*?/imsU',
|
||||||
|
'',
|
||||||
|
$body);
|
||||||
|
|
||||||
return rtrim($body);
|
return rtrim($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -253,6 +253,13 @@ OKAY
|
|||||||
|
|
||||||
{$emdash}
|
{$emdash}
|
||||||
Sent from Mailbox
|
Sent from Mailbox
|
||||||
|
EOMAIL
|
||||||
|
,
|
||||||
|
<<<EOMAIL
|
||||||
|
OKAY
|
||||||
|
|
||||||
|
2015-05-06 11:21 GMT-07:00 Someone <someone@somewhere.com>:
|
||||||
|
> ...
|
||||||
EOMAIL
|
EOMAIL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user