mirror of
https://github.com/friendica/friendica
synced 2025-04-28 17:44:22 +02:00
Refactor bbcode() into BBCode::convert()
This commit is contained in:
parent
29f5270313
commit
0c52866693
21 changed files with 89 additions and 73 deletions
|
@ -832,7 +832,7 @@ class DFRN
|
|||
}
|
||||
}
|
||||
if ($r->content) {
|
||||
XML::addElement($doc, $entry, "content", bbcode($r->content), ["type" => "html"]);
|
||||
XML::addElement($doc, $entry, "content", BBCode::convert($r->content), ["type" => "html"]);
|
||||
}
|
||||
|
||||
return $entry;
|
||||
|
@ -938,7 +938,7 @@ class DFRN
|
|||
$htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody;
|
||||
}
|
||||
|
||||
$htmlbody = bbcode($htmlbody, false, false, 7);
|
||||
$htmlbody = BBCode::convert($htmlbody, false, 7);
|
||||
}
|
||||
|
||||
$author = self::addEntryAuthor($doc, "author", $item["author-link"], $item);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
namespace Friendica\Protocol;
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -4197,7 +4198,7 @@ class Diaspora
|
|||
}
|
||||
|
||||
$about = $profile['about'];
|
||||
$about = strip_tags(bbcode($about));
|
||||
$about = strip_tags(BBCode::convert($about));
|
||||
|
||||
$location = Profile::formatLocation($profile);
|
||||
$tags = '';
|
||||
|
|
|
@ -1373,7 +1373,7 @@ class OStatus
|
|||
XML::addElement($doc, $author, "uri", $owner["url"]);
|
||||
XML::addElement($doc, $author, "name", $owner["nick"]);
|
||||
XML::addElement($doc, $author, "email", $owner["addr"]);
|
||||
XML::addElement($doc, $author, "summary", bbcode($owner["about"], false, false, 7));
|
||||
XML::addElement($doc, $author, "summary", BBCode::convert($owner["about"], false, 7));
|
||||
|
||||
$attributes = ["rel" => "alternate", "type" => "text/html", "href" => $owner["url"]];
|
||||
XML::addElement($doc, $author, "link", "", $attributes);
|
||||
|
@ -1398,7 +1398,7 @@ class OStatus
|
|||
|
||||
XML::addElement($doc, $author, "poco:preferredUsername", $owner["nick"]);
|
||||
XML::addElement($doc, $author, "poco:displayName", $owner["name"]);
|
||||
XML::addElement($doc, $author, "poco:note", bbcode($owner["about"], false, false, 7));
|
||||
XML::addElement($doc, $author, "poco:note", BBCode::convert($owner["about"], false, 7));
|
||||
|
||||
if (trim($owner["location"]) != "") {
|
||||
$element = $doc->createElement("poco:address");
|
||||
|
@ -1879,7 +1879,7 @@ class OStatus
|
|||
$body = "[b]".$item['title']."[/b]\n\n".$body;
|
||||
}
|
||||
|
||||
$body = bbcode($body, false, false, 7);
|
||||
$body = BBCode::convert($body, false, 7);
|
||||
|
||||
XML::addElement($doc, $entry, "content", $body, ["type" => "html"]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue