mirror of
https://github.com/friendica/friendica
synced 2025-04-26 04:30:11 +00:00
Refactor bbcode() into BBCode::convert()
This commit is contained in:
parent
29f5270313
commit
0c52866693
21 changed files with 89 additions and 73 deletions
|
@ -174,7 +174,7 @@ class BBCode
|
|||
}
|
||||
|
||||
if ($title != "") {
|
||||
$title = bbcode(html_entity_decode($title, ENT_QUOTES, 'UTF-8'), false, false, true);
|
||||
$title = BBCode::convert(html_entity_decode($title, ENT_QUOTES, 'UTF-8'), false, true);
|
||||
$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
|
||||
$title = str_replace(["[", "]"], ["[", "]"], $title);
|
||||
$data["title"] = $title;
|
||||
|
@ -409,7 +409,7 @@ class BBCode
|
|||
}
|
||||
}
|
||||
|
||||
$html = bbcode($post["text"].$post["after"], false, false, $htmlmode);
|
||||
$html = BBCode::convert($post["text"].$post["after"], false, $htmlmode);
|
||||
$msg = html2plain($html, 0, true);
|
||||
$msg = trim(html_entity_decode($msg, ENT_QUOTES, 'UTF-8'));
|
||||
|
||||
|
@ -706,7 +706,7 @@ class BBCode
|
|||
}
|
||||
|
||||
if ($data["description"] != "" && $data["description"] != $data["title"]) {
|
||||
$return .= sprintf('<blockquote>%s</blockquote>', trim(bbcode($data["description"])));
|
||||
$return .= sprintf('<blockquote>%s</blockquote>', trim(BBCode::convert($data["description"])));
|
||||
}
|
||||
|
||||
if ($data["type"] == "link") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue