summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/mail.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/mail.inc b/includes/mail.inc
index 8036815..8f0e244 100644
--- a/includes/mail.inc
+++ b/includes/mail.inc
@@ -475,7 +475,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";
}