Refactor bbcode() into BBCode::convert()

This commit is contained in:
Hypolite Petovan 2018-02-14 21:33:55 -05:00
parent 29f5270313
commit 0c52866693
21 changed files with 89 additions and 73 deletions

View file

@ -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"]);