1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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:
epriestley 2015-05-14 13:04:44 -07:00
parent 0228cdb7e2
commit b34d5bf44b
2 changed files with 13 additions and 0 deletions

View file

@ -123,6 +123,12 @@ final class PhabricatorMetaMTAEmailBodyParser {
'',
$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);
}

View file

@ -253,6 +253,13 @@ OKAY
{$emdash}
Sent from Mailbox
EOMAIL
,
<<<EOMAIL
OKAY
2015-05-06 11:21 GMT-07:00 Someone <someone@somewhere.com>:
> ...
EOMAIL
);
}