summaryrefslogtreecommitdiff
path: root/includes/mail.inc
diff options
context:
space:
mode:
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 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";
}