@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Strip email signatures from Mailbox

Summary: thanks mailbox

Test Plan: unit tests

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10629

+13
+7
src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
··· 103 103 '', 104 104 $body); 105 105 106 + // Mailbox seems to make an attempt to comply with the "standard" but 107 + // omits the leading newline and uses an em dash? 108 + $body = preg_replace( 109 + "/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su", 110 + '', 111 + $body); 112 + 106 113 // HTC Mail application (mobile) 107 114 $body = preg_replace( 108 115 '/^\s*^Sent from my HTC smartphone.*/sm',
+6
src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
··· 66 66 67 67 private function getEmailBodies() { 68 68 $trailing_space = ' '; 69 + $emdash = "\xE2\x80\x94"; 69 70 70 71 return array( 71 72 <<<EOEMAIL ··· 176 177 > -----Original Message----- 177 178 > 178 179 > ... 180 + EOMAIL 181 + , 182 + <<<EOMAIL 183 + OKAY {$emdash}{$trailing_space} 184 + Sent from Mailbox 179 185 EOMAIL 180 186 ); 181 187 }