diff --git a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php index 5138c1a2bd..07770600e6 100644 --- a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php +++ b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php @@ -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); } diff --git a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php index 6a124e30f4..d8ad49956d 100644 --- a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php +++ b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php @@ -253,6 +253,13 @@ OKAY {$emdash} Sent from Mailbox +EOMAIL +, +<<: +> ... EOMAIL ); }