X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FEmail.php;h=c3825a16bd1fa5f26e578fa15237f5083da13d25;hb=c9f02d534e2016acf18d7fa18db193d056495841;hp=b1eeb94d62f8903023c97ae3bec2074b9e828300;hpb=79696a19e505ecded7b257f511ad1691ccb311f4;p=friendica.git diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index b1eeb94d62..c3825a16bd 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -4,7 +4,7 @@ */ namespace Friendica\Protocol; -require_once 'include/html2plain.php'; +use Friendica\Content\Text\HTML; /** * @brief Email class @@ -111,7 +111,7 @@ class Email if (trim($ret['body']) == '') { $ret['body'] = self::messageGetPart($mbox, $uid, $struc, 0, 'plain'); } else { - $ret['body'] = html2bbcode($ret['body']); + $ret['body'] = HTML::toBBCode($ret['body']); } } else { $text = ''; @@ -128,7 +128,7 @@ class Email } } if (trim($html) != '') { - $ret['body'] = html2bbcode($html); + $ret['body'] = HTML::toBBCode($html); } else { $ret['body'] = $text; } @@ -328,7 +328,7 @@ class Email $body .= "Content-Transfer-Encoding: 8bit\n"; $body .= "Content-Type: text/plain; charset=utf-8; format=flowed\n\n"; - $body .= html2plain($html)."\n"; + $body .= HTML::toPlaintext($html)."\n"; $body .= "--=_".$part."\n"; $body .= "Content-Transfer-Encoding: 8bit\n";