From 74b90c002bf78903fa41be8abb26a2dcb57821e3 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Sun, 17 Apr 2011 13:24:36 -0400
Subject: [PATCH] Issue #299138 by catch, Kevin Hankens, drewish, arjenk, jrglasgow, stella, sun, kscheirer, lilou: drupal_html_to_text() formatting is broken and does not have tests.

---
 includes/mail.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/includes/mail.inc b/includes/mail.inc
index d2febed39686c9bf3f6f7a2bf99fa1377d09f4de..e2750f15669b5485edb86ae5b3d5098f21af03de 100644
--- a/includes/mail.inc
+++ b/includes/mail.inc
@@ -509,7 +509,7 @@ function drupal_html_to_text($string, $allowed_tags = NULL) {
         $chunk = $casing($chunk);
       }
       // Format it and apply the current indentation.
-      $output .= drupal_wrap_mail($chunk, implode('', $indent));
+      $output .= drupal_wrap_mail($chunk, implode('', $indent)) . MAIL_LINE_ENDINGS;
       // Remove non-quotation markers from indentation.
       $indent = array_map('_drupal_html_to_text_clean', $indent);
     }
-- 
1.7.1

