diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-04 15:11:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-04 15:11:21 +0000 |
commit | 445d7142c40cdd71032f5d8ce008065c267f3abb (patch) | |
tree | ce3ae255da338203fe077659de99ec281b647c16 /includes/mail.inc | |
parent | d30e1588cf5bad32961501d970fa2b473651fbad (diff) | |
download | brdo-445d7142c40cdd71032f5d8ce008065c267f3abb.tar.gz brdo-445d7142c40cdd71032f5d8ce008065c267f3abb.tar.bz2 |
- Patch #508738 by Eric_A, terrychild: drupal_html_to_text() negative padding error.
Diffstat (limited to 'includes/mail.inc')
-rw-r--r-- | includes/mail.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/mail.inc b/includes/mail.inc index 352df9976..efbc1ba92 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -575,7 +575,7 @@ function _drupal_html_to_text_pad($text, $pad, $prefix = '') { if (($p = strrpos($text, "\n")) === FALSE) { $p = -1; } - $n = max(0, 79 - (strlen($text) - $p)); + $n = max(0, 79 - (strlen($text) - $p) - strlen($prefix)); // Add prefix and padding, and restore linebreak. - return $text . $prefix . str_repeat($pad, $n - strlen($prefix)) . "\n"; + return $text . $prefix . str_repeat($pad, $n) . "\n"; } |