Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
445d7142
Commit
445d7142
authored
May 04, 2010
by
Dries
Browse files
- Patch
#508738
by Eric_A, terrychild: drupal_html_to_text() negative padding error.
parent
d30e1588
Changes
1
Show whitespace changes
Inline
Side-by-side
includes/mail.inc
View file @
445d7142
...
...
@@ -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
"
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment