From 2608c670ababfd04a4ce85393db7ebe4a0c14188 Mon Sep 17 00:00:00 2001 From: webchick Date: Wed, 29 Jun 2011 22:51:13 -0700 Subject: Issue #1130198 by pillarsdotnet, Damien Tournoud: Fixed Regression: line-breaks are mangled by drupal_html_to_text(). --- includes/mail.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/mail.inc') diff --git a/includes/mail.inc b/includes/mail.inc index d2febed39..7272df972 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -430,7 +430,7 @@ function drupal_html_to_text($string, $allowed_tags = NULL) { $indent[] = count($lists) ? ' "' : '>'; break; case 'li': - $indent[] = is_numeric($lists[0]) ? ' ' . $lists[0]++ . ') ' : ' * '; + $indent[] = isset($lists[0]) && is_numeric($lists[0]) ? ' ' . $lists[0]++ . ') ' : ' * '; break; case 'dd': $indent[] = ' '; @@ -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); } -- cgit v1.2.3