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
4be4a983
Commit
4be4a983
authored
Sep 21, 2013
by
alexpott
Browse files
Issue
#2078917
by sun: Fixed E-mails contain double spaces in soft-wrapped sentences.
parent
8ebd5dc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/includes/mail.inc
View file @
4be4a983
...
@@ -476,7 +476,7 @@ function _drupal_wrap_mail_line(&$line, $key, $values) {
...
@@ -476,7 +476,7 @@ function _drupal_wrap_mail_line(&$line, $key, $values) {
}
}
if
(
!
$line_is_mime_header
)
{
if
(
!
$line_is_mime_header
)
{
// Use soft-breaks only for purely quoted or unindented text.
// Use soft-breaks only for purely quoted or unindented text.
$line
=
wordwrap
(
$line
,
77
-
$values
[
'length'
],
$values
[
'soft'
]
?
"
\n
"
:
"
\n
"
);
$line
=
wordwrap
(
$line
,
77
-
$values
[
'length'
],
$values
[
'soft'
]
?
"
\n
"
:
"
\n
"
);
}
}
// Break really long words at the maximum width allowed.
// Break really long words at the maximum width allowed.
$line
=
wordwrap
(
$line
,
996
-
$values
[
'length'
],
$values
[
'soft'
]
?
"
\n
"
:
"
\n
"
);
$line
=
wordwrap
(
$line
,
996
-
$values
[
'length'
],
$values
[
'soft'
]
?
"
\n
"
:
"
\n
"
);
...
...
core/modules/system/lib/Drupal/system/Tests/Mail/WrapMailUnitTest.php
View file @
4be4a983
...
@@ -40,7 +40,7 @@ function testDrupalWrapMail() {
...
@@ -40,7 +40,7 @@ function testDrupalWrapMail() {
// 77 characters.
// 77 characters.
$this
->
assertEqual
(
$headers_in_body
,
$processed_headers
,
'Headers in the body are not wrapped.'
);
$this
->
assertEqual
(
$headers_in_body
,
$processed_headers
,
'Headers in the body are not wrapped.'
);
// Check that the body text is wrapped.
// Check that the body text is wrapped.
$this
->
assertEqual
(
wordwrap
(
$body
,
77
,
"
\n
"
),
$processed_body
,
'Body text is wrapped.'
);
$this
->
assertEqual
(
wordwrap
(
$body
,
77
,
"
\n
"
),
$processed_body
,
'Body text is wrapped.'
);
}
}
}
}
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