X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FOStatus.php;h=602d178bce2b77a5be73d2725619ff7d1fed693c;hb=27d94023eef0263a3ce9750f79a73ac941a25304;hp=bf0cca90c21e91adcf233adcf1d668eeedb632c0;hpb=c845415a99ebc348103815a7b2c55b15c75cdd24;p=friendica.git diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index bf0cca90c2..602d178bce 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -5,6 +5,7 @@ namespace Friendica\Protocol; use Friendica\Content\Text\BBCode; +use Friendica\Content\Text\HTML; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; @@ -25,7 +26,6 @@ use DOMDocument; use DOMXPath; require_once 'include/dba.php'; -require_once 'include/html2bbcode.php'; require_once 'include/items.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; @@ -171,7 +171,7 @@ class OStatus $value = $xpath->evaluate('atom:author/poco:note/text()', $context)->item(0)->nodeValue; if ($value != "") { - $contact["about"] = html2bbcode($value); + $contact["about"] = HTML::toBBCode($value); } $value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue; @@ -559,7 +559,7 @@ class OStatus */ private static function processPost($xpath, $entry, &$item, $importer) { - $item["body"] = html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue); + $item["body"] = HTML::toBBCode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue); $item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue; if (($item["object-type"] == ACTIVITY_OBJ_BOOKMARK) || ($item["object-type"] == ACTIVITY_OBJ_EVENT)) { $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; @@ -661,7 +661,7 @@ class OStatus if (($item["verb"] == ACTIVITY_POST) && $xpath->evaluate('boolean(atom:summary)', $entry)) { $clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue; if (!empty($clear_text)) { - $item['content-warning'] = html2bbcode($clear_text); + $item['content-warning'] = HTML::toBBCode($clear_text); } } @@ -1019,7 +1019,7 @@ class OStatus $item["author-link"] = $orig_author["author-link"]; $item["author-avatar"] = $orig_author["author-avatar"]; - $item["body"] = html2bbcode($orig_body); + $item["body"] = HTML::toBBCode($orig_body); $item["created"] = $orig_created; $item["edited"] = $orig_edited;