X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FMail%2FMailFormatHelper.php;h=431c846ceec9ec7347c77c7967f25572c765d8e4;hb=refs%2Fheads%2Fd864;hp=021028fce819b64ddc47705b9e6a8bf64d98292e;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Mail/MailFormatHelper.php b/web/core/lib/Drupal/Core/Mail/MailFormatHelper.php index 021028fce..431c846ce 100644 --- a/web/core/lib/Drupal/Core/Mail/MailFormatHelper.php +++ b/web/core/lib/Drupal/Core/Mail/MailFormatHelper.php @@ -3,7 +3,6 @@ namespace Drupal\Core\Mail; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\Xss; use Drupal\Core\Site\Settings; @@ -106,7 +105,8 @@ class MailFormatHelper { if (empty(static::$supportedTags)) { static::$supportedTags = ['a', 'em', 'i', 'strong', 'b', 'br', 'p', 'blockquote', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'h1', 'h2', 'h3', - 'h4', 'h5', 'h6', 'hr']; + 'h4', 'h5', 'h6', 'hr', + ]; } // Make sure only supported tags are kept. @@ -221,12 +221,12 @@ class MailFormatHelper { // Fancy headers. case 'h1': $indent[] = '======== '; - $casing = '\Drupal\Component\Utility\Unicode::strtoupper'; + $casing = 'mb_strtoupper'; break; case 'h2': $indent[] = '-------- '; - $casing = '\Drupal\Component\Utility\Unicode::strtoupper'; + $casing = 'mb_strtoupper'; break; case '/h1': @@ -259,7 +259,7 @@ class MailFormatHelper { // Convert inline HTML text to plain text; not removing line-breaks or // white-space, since that breaks newlines when sanitizing plain-text. $value = trim(Html::decodeEntities($value)); - if (Unicode::strlen($value)) { + if (mb_strlen($value)) { $chunk = $value; } }