Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15449349
D10629.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10629.diff
View Options
diff --git a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
--- a/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
+++ b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
@@ -103,6 +103,13 @@
'',
$body);
+ // Mailbox seems to make an attempt to comply with the "standard" but
+ // omits the leading newline and uses an em dash?
+ $body = preg_replace(
+ "/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su",
+ '',
+ $body);
+
// HTC Mail application (mobile)
$body = preg_replace(
'/^\s*^Sent from my HTC smartphone.*/sm',
diff --git a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
--- a/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
+++ b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
@@ -66,6 +66,7 @@
private function getEmailBodies() {
$trailing_space = ' ';
+ $emdash = "\xE2\x80\x94";
return array(
<<<EOEMAIL
@@ -177,6 +178,11 @@
>
> ...
EOMAIL
+,
+<<<EOMAIL
+OKAY {$emdash}{$trailing_space}
+Sent from Mailbox
+EOMAIL
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 29, 9:39 AM (6 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7351215
Default Alt Text
D10629.diff (1 KB)
Attached To
Mode
D10629: Strip email signatures from Mailbox
Attached
Detach File
Event Timeline
Log In to Comment