1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Fix for email parsing from Outlook clients.

Summary: D1239 got it mostly right, but some versions of Outlook apparently put a '> ' in front of the 'Original Message' marker, which the parser couln't grok.

Test Plan: Added a test case to the unit tests, applied the patch to my install and asked one of my heathen Outlook using colleagues to reply to a Conpherence post.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D8998
This commit is contained in:
William R. Otte 2014-05-06 20:31:27 -05:00
parent 7f56bcd2d4
commit a57cbbea8c
2 changed files with 10 additions and 2 deletions

View file

@ -76,13 +76,13 @@ final class PhabricatorMetaMTAEmailBodyParser {
// Outlook english // Outlook english
$body = preg_replace( $body = preg_replace(
'/^\s*-----Original Message-----.*?/imsU', '/^\s*(> )?-----Original Message-----.*?/imsU',
'', '',
$body); $body);
// Outlook danish // Outlook danish
$body = preg_replace( $body = preg_replace(
'/^\s*-----Oprindelig Meddelelse-----.*?/imsU', '/^\s*(> )?-----Oprindelig Meddelelse-----.*?/imsU',
'', '',
$body); $body);

View file

@ -168,6 +168,14 @@ OKAY
> On 17 Oct 2013, at 17:47, "Someone" <somebody@somewhere> wrote: > On 17 Oct 2013, at 17:47, "Someone" <somebody@somewhere> wrote:
> ... > ...
EOMAIL
,
<<<EOMAIL
OKAY
> -----Original Message-----
>
> ...
EOMAIL EOMAIL
); );
} }