summaryrefslogtreecommitdiff
path: root/includes/mail.inc
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-06-29 22:51:13 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-06-29 22:51:13 -0700
commit2608c670ababfd04a4ce85393db7ebe4a0c14188 (patch)
treefbdcb5236b5fd0822257a9773f18e90844028650 /includes/mail.inc
parent33f6c5608c62b27fa86d52e8806435a6c94f3eee (diff)
downloadbrdo-2608c670ababfd04a4ce85393db7ebe4a0c14188.tar.gz
brdo-2608c670ababfd04a4ce85393db7ebe4a0c14188.tar.bz2
Issue #1130198 by pillarsdotnet, Damien Tournoud: Fixed Regression: line-breaks are mangled by drupal_html_to_text().
Diffstat (limited to 'includes/mail.inc')
-rw-r--r--includes/mail.inc4
1 files changed, 2 insertions, 2 deletions
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);
}