Skip to content

Commit

Permalink
Improved handling of machine readable MDN data
Browse files Browse the repository at this point in the history
it looks like header data, but there isn't requirements regarding
newlines between entries, so need to normalize to use our existing MIME
header parsing code
  • Loading branch information
slusarz committed Mar 23, 2015
1 parent dc21773 commit 6f44f21
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion imp/lib/Mime/Viewer/Mdn.php
Expand Up @@ -123,7 +123,14 @@ protected function _renderInfo()
);

if ($machine) {
$parse = Horde_Mime_Headers::parseHeaders($machine->getContents());
$parse = Horde_Mime_Headers::parseHeaders(
/* Remove extra line endings. */
preg_replace(
'/\n{2,}/',
"\n",
strtr($machine->getContents(), "\r", "\n")
)
);

if (isset($parse['Final-Recipient'])) {
list(,$recip) = explode(
Expand Down

0 comments on commit 6f44f21

Please sign in to comment.