]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Avoid "Class not found" error
authorMichael <heluecht@pirati.ca>
Thu, 8 Mar 2018 19:58:35 +0000 (19:58 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 8 Mar 2018 19:58:35 +0000 (19:58 +0000)
src/Content/Text/Markdown.php
src/Core/NotificationsManager.php
src/Protocol/DFRN.php
src/Protocol/Email.php
src/Protocol/Feed.php

index ff6f890bb53361bcf1b9ab762c9344143a43f4bf..ac598d0fc4826dbcfcd575cb9a90fb2e2ad210d3 100644 (file)
@@ -9,6 +9,7 @@ namespace Friendica\Content\Text;
 use Friendica\BaseObject;
 use Friendica\Model\Contact;
 use Michelf\MarkdownExtra;
+use Friendica\Content\Text\HTML;
 
 /**
  * Friendica-specific usage of Markdown
@@ -92,7 +93,7 @@ class Markdown extends BaseObject
 
                $s = str_replace('&#35;', '#', $s);
 
-               $s = Friendica\Content\Text\HTML::toBBCode($s);
+               $s = HTML::toBBCode($s);
 
                // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
                $s = str_replace('&#x2672;', html_entity_decode('&#x2672;', ENT_QUOTES, 'UTF-8'), $s);
index 95be5cdede0579db74a941fd7932444b9cb62093..2f2af5174ae7c44e0a0ba287be5d379dd7bf179e 100644 (file)
@@ -8,6 +8,7 @@ namespace Friendica\Core;
 
 use Friendica\BaseObject;
 use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
@@ -46,7 +47,7 @@ class NotificationsManager extends BaseObject
                        $n['timestamp'] = strtotime($local_time);
                        $n['date_rel'] = Temporal::getRelativeDate($n['date']);
                        $n['msg_html'] = BBCode::convert($n['msg'], false);
-                       $n['msg_plain'] = explode("\n", trim(Friendica\Content\Text\HTML::toPlaintext($n['msg_html'], 0)))[0];
+                       $n['msg_plain'] = explode("\n", trim(HTML::toPlaintext($n['msg_html'], 0)))[0];
 
                        $rets[] = $n;
                }
index 3def7d3a8c94735b5f3af3e1fc56d6bb1eebcf90..16764056cb126e908b8ef40e5f9788b2783dfc8d 100644 (file)
@@ -11,6 +11,7 @@ namespace Friendica\Protocol;
 use Friendica\App;
 use Friendica\Content\OEmbed;
 use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
@@ -2453,7 +2454,7 @@ class DFRN
                        $purifier = new HTMLPurifier($config);
                        $item['body'] = $purifier->purify($item['body']);
 
-                       $item['body'] = @Friendica\Content\Text\HTML::toBBCode($item['body']);
+                       $item['body'] = @HTML::toBBCode($item['body']);
                }
 
                /// @todo We should check for a repeated post and if we know the repeated author.
index 054a1f4ff769ac55e7b6d833075398c4c651de2e..c3825a16bd1fa5f26e578fa15237f5083da13d25 100644 (file)
@@ -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 .= Friendica\Content\Text\HTML::toPlaintext($html)."\n";
+               $body .= HTML::toPlaintext($html)."\n";
 
                $body .= "--=_".$part."\n";
                $body .= "Content-Transfer-Encoding: 8bit\n";
index c67df646b4dd0cfafc2c0a203009d754e953785f..cf5734facc1a12ebedcc7a9934dc5803a8b59896 100644 (file)
@@ -10,6 +10,8 @@ use Friendica\Database\DBM;
 use Friendica\Core\System;
 use Friendica\Model\Item;
 use Friendica\Util\Network;
+use Friendica\Content\Text\HTML;
+
 use dba;
 use DOMDocument;
 use DOMXPath;
@@ -362,7 +364,7 @@ class Feed {
                        if (self::titleIsBody($item["title"], $body)) {
                                $item["title"] = "";
                        }
-                       $item["body"] = Friendica\Content\Text\HTML::toBBCode($body, $basepath);
+                       $item["body"] = HTML::toBBCode($body, $basepath);
 
                        if (($item["body"] == '') && ($item["title"] != '')) {
                                $item["body"] = $item["title"];