diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index dd8864a63..e69ac36f6 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -186,9 +186,6 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) {
-
- require_once "include/bbcode.php";
-
$a = get_app();
$o = '';
diff --git a/include/api.php b/include/api.php
index 013d47fe2..f7c04aaf8 100644
--- a/include/api.php
+++ b/include/api.php
@@ -40,7 +40,6 @@ use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
-require_once 'include/bbcode.php';
require_once 'include/conversation.php';
require_once 'include/html2plain.php';
require_once 'mod/share.php';
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 0a869ab38..bea15e3d4 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -12,7 +12,6 @@ use League\HTMLToMarkdown\HtmlConverter;
require_once 'include/event.php';
require_once 'include/html2bbcode.php';
-require_once 'include/bbcode.php';
/**
* @brief Callback function to replace a Diaspora style mention in a mention for Friendica
diff --git a/include/conversation.php b/include/conversation.php
index 71770d31d..1ff1dbf5f 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -21,7 +21,6 @@ use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use Friendica\Util\XML;
-require_once "include/bbcode.php";
require_once "include/acl_selectors.php";
function item_extract_images($body) {
@@ -499,7 +498,6 @@ function item_condition() {
*
*/
function conversation(App $a, $items, $mode, $update, $preview = false) {
- require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
$ssl_state = ((local_user()) ? true : false);
diff --git a/include/enotify.php b/include/enotify.php
index 2b6eec576..c877540ab 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -12,7 +12,6 @@ use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Emailer;
-require_once 'include/bbcode.php';
require_once 'include/html2bbcode.php';
/**
diff --git a/include/event.php b/include/event.php
index c86ba732b..1c34e03cc 100644
--- a/include/event.php
+++ b/include/event.php
@@ -16,7 +16,6 @@ use Friendica\Model\Profile;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Map;
-require_once 'include/bbcode.php';
require_once 'include/conversation.php';
function format_event_html($ev, $simple = false) {
@@ -239,7 +238,6 @@ function event_delete($event_id) {
function event_store($arr) {
require_once 'include/items.php';
- require_once 'include/bbcode.php';
$a = get_app();
diff --git a/include/items.php b/include/items.php
index 456853d80..31c8aaa79 100644
--- a/include/items.php
+++ b/include/items.php
@@ -19,7 +19,6 @@ use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
use Friendica\Util\Temporal;
-require_once 'include/bbcode.php';
require_once 'include/text.php';
require_once 'mod/share.php';
require_once 'include/enotify.php';
diff --git a/include/text.php b/include/text.php
index ee5d4763e..02f17fdb4 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1424,9 +1424,6 @@ function prepare_body(&$item, $attach = false, $preview = false) {
* @return string Formattet HTML.
*/
function prepare_text($text) {
-
- require_once 'include/bbcode.php';
-
if (stristr($text, '[nosmile]')) {
$s = BBCode::convert($text);
} else {
diff --git a/mod/babel.php b/mod/babel.php
index 683bc5fed..43b5c4e80 100644
--- a/mod/babel.php
+++ b/mod/babel.php
@@ -7,7 +7,6 @@ use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Markdown;
use Friendica\Core\L10n;
-require_once 'include/bbcode.php';
require_once 'include/bb2diaspora.php';
require_once 'include/html2bbcode.php';
@@ -43,7 +42,6 @@ function babel_content()
$o .= '
' . L10n::t("bbcode \x28raw HTML\x28: ") . '
' . EOL . EOL;
$o .= htmlspecialchars($html) . EOL . EOL;
- //$html = bbcode($text);
$o .= '' . L10n::t('bbcode: ') . '
' . EOL . EOL;
$o .= $html . EOL . EOL;
diff --git a/mod/community.php b/mod/community.php
index 5536a4934..88fc6168b 100644
--- a/mod/community.php
+++ b/mod/community.php
@@ -63,7 +63,6 @@ function community_content(App $a, $update = 0)
}
}
- require_once 'include/bbcode.php';
require_once 'include/security.php';
require_once 'include/conversation.php';
diff --git a/mod/display.php b/mod/display.php
index 1e1515f10..42aad736c 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -367,8 +367,8 @@ function display_content(App $a, $update = false, $update_uid = 0) {
$o .= conversation($a, $items, 'display', $update_uid);
// Preparing the meta header
- require_once 'include/bbcode.php';
require_once 'include/html2plain.php';
+
$description = trim(html2plain(BBCode::convert($s[0]["body"], false), 0, true));
$title = trim(html2plain(BBCode::convert($s[0]["title"], false), 0, true));
$author_name = $s[0]["author-name"];
diff --git a/mod/events.php b/mod/events.php
index 5f6fb2c68..695dbb290 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -15,7 +15,6 @@ use Friendica\Model\Profile;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
-require_once 'include/bbcode.php';
require_once 'include/event.php';
require_once 'include/items.php';
diff --git a/mod/filer.php b/mod/filer.php
index 177b80acb..190b6f78a 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -7,7 +7,6 @@ use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once 'include/security.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
function filer_content(App $a)
diff --git a/mod/like.php b/mod/like.php
index 9371c3074..957fe5fc4 100644
--- a/mod/like.php
+++ b/mod/like.php
@@ -5,7 +5,6 @@ use Friendica\Core\System;
use Friendica\Model\Item;
require_once 'include/security.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
function like_content(App $a) {
diff --git a/mod/message.php b/mod/message.php
index d51fe0a77..bb32b5a72 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -336,8 +336,6 @@ function message_content(App $a)
intval(local_user())
);
- require_once("include/bbcode.php");
-
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, [
'$baseurl' => System::baseUrl(true),
diff --git a/mod/notes.php b/mod/notes.php
index b607c084e..3b46df07d 100644
--- a/mod/notes.php
+++ b/mod/notes.php
@@ -31,7 +31,6 @@ function notes_content(App $a, $update = false)
return;
}
- require_once 'include/bbcode.php';
require_once 'include/security.php';
require_once 'include/conversation.php';
require_once 'include/acl_selectors.php';
diff --git a/mod/notify.php b/mod/notify.php
index a65e14deb..f22c1cf5b 100644
--- a/mod/notify.php
+++ b/mod/notify.php
@@ -62,7 +62,6 @@ function notify_content(App $a)
$notif_tpl = get_markup_template('notifications.tpl');
$not_tpl = get_markup_template('notify.tpl');
- require_once('include/bbcode.php');
$r = $nm->getAll(['seen'=>0]);
if (DBM::is_result($r) > 0) {
diff --git a/mod/photos.php b/mod/photos.php
index 863a848d6..2b6998ae1 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -27,7 +27,6 @@ use Friendica\Util\Temporal;
require_once 'include/items.php';
require_once 'include/acl_selectors.php';
-require_once 'include/bbcode.php';
require_once 'include/security.php';
function photos_init(App $a) {
@@ -934,7 +933,6 @@ function photos_content(App $a)
return;
}
- require_once 'include/bbcode.php';
require_once 'include/security.php';
require_once 'include/conversation.php';
diff --git a/mod/ping.php b/mod/ping.php
index e24168aa9..146411206 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -19,7 +19,6 @@ use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use Friendica\Util\XML;
-require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
require_once 'include/enotify.php';
diff --git a/mod/poco.php b/mod/poco.php
index d212bb5f9..0728020ec 100644
--- a/mod/poco.php
+++ b/mod/poco.php
@@ -246,7 +246,6 @@ function poco_init(App $a) {
}
$about = Cache::get("about:" . $contact['updated'] . ":" . $contact['nurl']);
if (is_null($about)) {
- require_once 'include/bbcode.php';
$about = BBCode::convert($contact['about'], false);
Cache::set("about:" . $contact['updated'] . ":" . $contact['nurl'], $about);
}
diff --git a/mod/poke.php b/mod/poke.php
index c12079173..3148896bc 100644
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -22,7 +22,6 @@ use Friendica\Database\DBM;
use Friendica\Model\Item;
require_once 'include/security.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
function poke_init(App $a) {
diff --git a/mod/profile.php b/mod/profile.php
index a7c39ab33..74ca06aad 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -116,7 +116,6 @@ function profile_content(App $a, $update = 0)
return Login::form();
}
- require_once 'include/bbcode.php';
require_once 'include/security.php';
require_once 'include/conversation.php';
require_once 'include/acl_selectors.php';
diff --git a/mod/register.php b/mod/register.php
index 76c5073d5..51ed57a9c 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -15,7 +15,6 @@ use Friendica\Model\User;
use Friendica\Util\DateTimeFormat;
require_once 'include/enotify.php';
-require_once 'include/bbcode.php';
function register_post(App $a)
{
diff --git a/mod/search.php b/mod/search.php
index afe94121d..1f9393465 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -11,7 +11,6 @@ use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
-require_once "include/bbcode.php";
require_once 'include/security.php';
require_once 'include/conversation.php';
require_once 'mod/dirfind.php';
diff --git a/mod/subthread.php b/mod/subthread.php
index b4f2ca819..c858f2d1f 100644
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -10,7 +10,6 @@ use Friendica\Database\DBM;
use Friendica\Model\Item;
require_once 'include/security.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
function subthread_content(App $a) {
diff --git a/mod/tagger.php b/mod/tagger.php
index c602613f1..16195cc33 100644
--- a/mod/tagger.php
+++ b/mod/tagger.php
@@ -11,7 +11,6 @@ use Friendica\Database\DBM;
use Friendica\Model\Item;
require_once 'include/security.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
function tagger_content(App $a) {
diff --git a/mod/tagrm.php b/mod/tagrm.php
index b7e72b4da..b9991d68d 100644
--- a/mod/tagrm.php
+++ b/mod/tagrm.php
@@ -10,8 +10,6 @@ use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Item;
-require_once 'include/bbcode.php';
-
function tagrm_post(App $a) {
if (!local_user()) {
diff --git a/mod/videos.php b/mod/videos.php
index 65dda1b49..75a4d031f 100644
--- a/mod/videos.php
+++ b/mod/videos.php
@@ -20,7 +20,6 @@ use Friendica\Util\DateTimeFormat;
require_once 'include/items.php';
require_once 'include/acl_selectors.php';
-require_once 'include/bbcode.php';
require_once 'include/security.php';
function videos_init(App $a) {
@@ -202,8 +201,6 @@ function videos_content(App $a) {
return;
}
-
- require_once('include/bbcode.php');
require_once('include/security.php');
require_once('include/conversation.php');
diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 064d5030e..9f250e9bf 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -23,7 +23,6 @@ use Friendica\Util\Map;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
-require_once "include/bbcode.php";
require_once "include/event.php";
require_once "include/html2plain.php";
require_once "mod/proxy.php";
diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php
index 3d11789e9..0e552d2e0 100644
--- a/src/Core/NotificationsManager.php
+++ b/src/Core/NotificationsManager.php
@@ -20,7 +20,6 @@ use Friendica\Util\XML;
require_once 'include/dba.php';
require_once 'include/html2plain.php';
-require_once 'include/bbcode.php';
/**
* @brief Methods for read and write notifications from/to database
diff --git a/src/Model/Profile.php b/src/Model/Profile.php
index d1a705fd7..81f996309 100644
--- a/src/Model/Profile.php
+++ b/src/Model/Profile.php
@@ -24,7 +24,6 @@ use Friendica\Util\Temporal;
use dba;
require_once 'include/dba.php';
-require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
class Profile
@@ -625,8 +624,6 @@ class Profile
public static function getEvents()
{
- require_once 'include/bbcode.php';
-
$a = get_app();
$o = '';
diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php
index 00064b7e8..6876d2541 100644
--- a/src/Protocol/DFRN.php
+++ b/src/Protocol/DFRN.php
@@ -43,7 +43,6 @@ require_once "include/items.php";
require_once "include/event.php";
require_once "include/text.php";
require_once "include/html2bbcode.php";
-require_once "include/bbcode.php";
/**
* @brief This class contain functions to create and send DFRN XML files
diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php
index ed3c5c0a0..7b06a2d68 100644
--- a/src/Protocol/OStatus.php
+++ b/src/Protocol/OStatus.php
@@ -26,7 +26,6 @@ use DOMXPath;
require_once 'include/dba.php';
require_once 'include/html2bbcode.php';
-require_once 'include/bbcode.php';
require_once 'include/items.php';
require_once 'mod/share.php';
require_once 'include/enotify.php';
diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php
index dbc0bdb5d..b8eceb05b 100644
--- a/src/Worker/Delivery.php
+++ b/src/Worker/Delivery.php
@@ -19,7 +19,6 @@ use dba;
require_once 'include/html2plain.php';
require_once 'include/items.php';
-require_once 'include/bbcode.php';
/// @todo This is some ugly code that needs to be split into several methods
diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php
index f22549c2b..b43639b84 100644
--- a/src/Worker/Notifier.php
+++ b/src/Worker/Notifier.php
@@ -20,7 +20,6 @@ use dba;
require_once 'include/dba.php';
require_once 'include/html2plain.php';
require_once 'include/items.php';
-require_once 'include/bbcode.php';
/*
* This file was at one time responsible for doing all deliveries, but this caused
diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php
index 29be22199..3f4a764ce 100644
--- a/src/Worker/Queue.php
+++ b/src/Worker/Queue.php
@@ -18,7 +18,6 @@ use dba;
require_once 'include/dba.php';
require_once 'include/items.php';
-require_once 'include/bbcode.php';
class Queue
{