Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15412675
D12349.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
D12349.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
@@ -135,9 +135,11 @@
$body);
// Mailbox seems to make an attempt to comply with the "standard" but
- // omits the leading newline and uses an em dash?
+ // omits the leading newline and uses an em dash. This may or may not have
+ // the trailing space, but it's unique enough that there's no real ambiguity
+ // in detecting it.
$body = preg_replace(
- "/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su",
+ "/\s*\xE2\x80\x94\s*\nSent from Mailbox\s*\z/su",
'',
$body);
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
@@ -247,6 +247,13 @@
OKAY {$emdash}{$trailing_space}
Sent from Mailbox
EOMAIL
+,
+<<<EOMAIL
+OKAY
+
+{$emdash}
+Sent from Mailbox
+EOMAIL
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 2:18 PM (1 w, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309359
Default Alt Text
D12349.diff (1 KB)
Attached To
Mode
D12349: Strip more Mailbox signatures
Attached
Detach File
Event Timeline
Log In to Comment