Commit 4be4a983 authored by alexpott's avatar alexpott

Issue #2078917 by sun: Fixed E-mails contain double spaces in soft-wrapped sentences.

parent 8ebd5dc9
......@@ -476,7 +476,7 @@ function _drupal_wrap_mail_line(&$line, $key, $values) {
}
if (!$line_is_mime_header) {
// 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.
$line = wordwrap($line, 996 - $values['length'], $values['soft'] ? " \n" : "\n");
......
......@@ -40,7 +40,7 @@ function testDrupalWrapMail() {
// 77 characters.
$this->assertEqual($headers_in_body, $processed_headers, 'Headers in the body are not 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.');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment