diff --git a/core/includes/mail.inc b/core/includes/mail.inc
index f58a76e..4032ed7 100644
--- a/core/includes/mail.inc
+++ b/core/includes/mail.inc
@@ -569,7 +569,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) - strlen($prefix));
+ $n = max(0, 78 - (strlen($text) - $p) - strlen($prefix));
// Add prefix and padding, and restore linebreak.
return $text . $prefix . str_repeat($pad, $n) . "\n";
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Mail/HtmlToTextTest.php b/core/modules/system/lib/Drupal/system/Tests/Mail/HtmlToTextTest.php
index 5970114..a383809 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Mail/HtmlToTextTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Mail/HtmlToTextTest.php
@@ -94,10 +94,10 @@ class HtmlToTextTest extends WebTestBase {
// @todo The
tag is currently not supported.
'
Drupal
Drupal
' => "DrupalDrupal\n",
'
Drupal' => "/Drupal/\n",
- '
Drupal
' => "======== DRUPAL ==============================================================\n\n",
- '
Drupal
Drupal
' => "======== DRUPAL ==============================================================\n\nDrupal\n\n",
- '
Drupal
' => "-------- DRUPAL --------------------------------------------------------------\n\n",
- '
Drupal
Drupal
' => "-------- DRUPAL --------------------------------------------------------------\n\nDrupal\n\n",
+ '
Drupal
' => "======== DRUPAL =============================================================\n\n",
+ '
Drupal
Drupal
' => "======== DRUPAL =============================================================\n\nDrupal\n\n",
+ '
Drupal
' => "-------- DRUPAL -------------------------------------------------------------\n\n",
+ '
Drupal
Drupal
' => "-------- DRUPAL -------------------------------------------------------------\n\nDrupal\n\n",
'
Drupal
' => ".... Drupal\n\n",
'
Drupal
Drupal
' => ".... Drupal\n\nDrupal\n\n",
'
Drupal
' => ".. Drupal\n\n",
@@ -106,9 +106,9 @@ class HtmlToTextTest extends WebTestBase {
'
Drupal
Drupal
' => "Drupal\n\nDrupal\n\n",
'
Drupal
' => "Drupal\n\n",
'
Drupal
Drupal
' => "Drupal\n\nDrupal\n\n",
- '
Drupal
' => "------------------------------------------------------------------------------\nDrupal\n------------------------------------------------------------------------------\n",
- '
Drupal
' => "------------------------------------------------------------------------------\nDrupal\n------------------------------------------------------------------------------\n",
- '
Drupal
Drupal
' => "------------------------------------------------------------------------------\nDrupal\n------------------------------------------------------------------------------\nDrupal\n\n",
+ '
Drupal
' => "-----------------------------------------------------------------------------\nDrupal\n-----------------------------------------------------------------------------\n",
+ '
Drupal
' => "-----------------------------------------------------------------------------\nDrupal\n-----------------------------------------------------------------------------\n",
+ '
Drupal
Drupal
' => "-----------------------------------------------------------------------------\nDrupal\n-----------------------------------------------------------------------------\nDrupal\n\n",
'
Drupal' => "/Drupal/\n",
'
Drupal
' => "Drupal\n\n",
'
Drupal
Drupal
' => "Drupal\n\nDrupal\n\n",
@@ -140,7 +140,7 @@ class HtmlToTextTest extends WebTestBase {
'
- Drupal
- Drupal
- Drupal
- Drupal
- Drupal
- Drupal
' => " * Drupal\n * Drupal\n Drupal\n Drupal\n Drupal\n \n * Drupal\n\n",
// Tests malformed HTML tags.
'
Drupal
Drupal' => "Drupal\nDrupal\n",
- '
Drupal
Drupal' => "------------------------------------------------------------------------------\nDrupal\n------------------------------------------------------------------------------\nDrupal\n",
+ '
Drupal
Drupal' => "-----------------------------------------------------------------------------\nDrupal\n-----------------------------------------------------------------------------\nDrupal\n",
'
- Drupal
- Drupal
' => " 1) Drupal\n 2) Drupal\n\n",
'
' => " * Drupal /Drupal/ Drupal\n\n",
'
- Drupal
- Drupal' => " * Drupal\n * Drupal\n\n",
@@ -269,21 +269,21 @@ class HtmlToTextTest extends WebTestBase {
public function testHeaderSeparation() {
$html = 'Drupal
Drupal
Drupal';
// @todo There should be more space above the header than below it.
- $text = "Drupal\n======== DRUPAL ==============================================================\n\nDrupal\n";
+ $text = "Drupal\n======== DRUPAL =============================================================\n\nDrupal\n";
$this->assertHtmlToText($html, $text,
'Text before and after tag');
$html = '
Drupal
Drupal
Drupal';
// @todo There should be more space above the header than below it.
- $text = "Drupal\n\n======== DRUPAL ==============================================================\n\nDrupal\n";
+ $text = "Drupal\n\n======== DRUPAL =============================================================\n\nDrupal\n";
$this->assertHtmlToText($html, $text,
'Paragraph before and text after tag');
$html = 'DrupalDrupal
Drupal
';
// @todo There should be more space above the header than below it.
- $text = "Drupal\n======== DRUPAL ==============================================================\n\nDrupal\n\n";
+ $text = "Drupal\n======== DRUPAL =============================================================\n\nDrupal\n\n";
$this->assertHtmlToText($html, $text,
'Text before and paragraph after tag');
$html = '
Drupal
Drupal
Drupal
';
- $text = "Drupal\n\n======== DRUPAL ==============================================================\n\nDrupal\n\n";
+ $text = "Drupal\n\n======== DRUPAL =============================================================\n\nDrupal\n\n";
$this->assertHtmlToText($html, $text,
'Paragraph before and after tag');
}