@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 more Mailbox signatures

Summary: Saw this variant in a thread.

Test Plan: Unit tests.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

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

+11 -2
+4 -2
src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
··· 135 135 $body); 136 136 137 137 // Mailbox seems to make an attempt to comply with the "standard" but 138 - // omits the leading newline and uses an em dash? 138 + // omits the leading newline and uses an em dash. This may or may not have 139 + // the trailing space, but it's unique enough that there's no real ambiguity 140 + // in detecting it. 139 141 $body = preg_replace( 140 - "/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su", 142 + "/\s*\xE2\x80\x94\s*\nSent from Mailbox\s*\z/su", 141 143 '', 142 144 $body); 143 145
+7
src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
··· 247 247 OKAY {$emdash}{$trailing_space} 248 248 Sent from Mailbox 249 249 EOMAIL 250 + , 251 + <<<EOMAIL 252 + OKAY 253 + 254 + {$emdash} 255 + Sent from Mailbox 256 + EOMAIL 250 257 ); 251 258 } 252 259