From cd2bca664c7382da10444a3fce4380703d28ce69 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 11 Apr 2012 10:31:04 -0700 Subject: [PATCH] Detect alternate Danish outlook reply pattern Summary: Sometimes we get a lowercase "Meddelelse" in Danish outlook. Relax the patterns since the risk of hitting false positives here is essentially nonexistant. Test Plan: Unit tests. Reviewers: davidreuss, btrahan, vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D2205 --- .../parser/PhabricatorMetaMTAEmailBodyParser.php | 4 ++-- ...PhabricatorMetaMTAEmailBodyParserTestCase.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php index 2701631a98..e384ef1290 100644 --- a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php +++ b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php @@ -30,13 +30,13 @@ final class PhabricatorMetaMTAEmailBodyParser { // Outlook english $body = preg_replace( - '/^\s*-----Original Message-----.*?/msU', + '/^\s*-----Original Message-----.*?/imsU', '', $body); // Outlook danish $body = preg_replace( - '/^\s*-----Oprindelig Meddelelse-----.*?/msU', + '/^\s*-----Oprindelig Meddelelse-----.*?/imsU', '', $body); diff --git a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php index 5f0a74eaa4..190cddff0f 100644 --- a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php +++ b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php @@ -80,6 +80,22 @@ EOEMAIL << ... +EOEMAIL +, +<< ... +EOEMAIL +, +<<