projects
/
project/drupal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
221d7fd
)
#508738 by terrychild, Eric_A: prevent the padding in drupalhtml_to_text() from falli...
author
Gábor Hojtsy
Wed, 2 Jun 2010 12:07:24 +0000 (12:07 +0000)
committer
Gábor Hojtsy
Wed, 2 Jun 2010 12:07:24 +0000 (12:07 +0000)
includes/mail.inc
patch
|
blob
|
blame
|
history
diff --git
a/includes/mail.inc
b/includes/mail.inc
index
8036815
..
8f0e244
100644
(file)
--- 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";
}