diff --git a/include/api.php b/include/api.php index 07ff900832..8579d2d185 100644 --- a/include/api.php +++ b/include/api.php @@ -8,7 +8,7 @@ use Friendica\App; use Friendica\Content\ContactSelector; use Friendica\Content\Feature; -use Friendica\Content\Text\Plaintext; +use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\System; use Friendica\Core\Config; @@ -5196,7 +5196,7 @@ function api_clean_plain_items($Text) */ function api_clean_attachments($body) { - $data = Plaintext::getAttachmentData($body); + $data = BBCode::getAttachmentData($body); if (!$data) { return $body; diff --git a/include/bbcode.php b/include/bbcode.php index 2223eac634..dfaed8ef78 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -5,7 +5,7 @@ use Friendica\App; use Friendica\Content\Smilies; use Friendica\Content\OEmbed; -use Friendica\Content\Text\Plaintext; +use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Cache; use Friendica\Core\L10n; @@ -57,7 +57,7 @@ function bb_map_location($match) { */ function bb_attachment($return, $simplehtml = false, $tryoembed = true) { - $data = Plaintext::getAttachmentData($return); + $data = BBCode::getAttachmentData($return); if (!$data) { return $return; } @@ -120,7 +120,7 @@ function bb_attachment($return, $simplehtml = false, $tryoembed = true) function bb_remove_share_information($Text, $plaintext = false, $nolink = false) { - $data = Plaintext::getAttachmentData($Text); + $data = BBCode::getAttachmentData($Text); if (!$data) { return $Text; diff --git a/mod/item.php b/mod/item.php index 10b4d47c4a..d1186a2a0a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -15,7 +15,7 @@ * information. */ use Friendica\App; -use Friendica\Content\Text\Plaintext; +use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; @@ -507,7 +507,7 @@ function item_post(App $a) { // embedded bookmark or attachment in post? set bookmark flag $bookmark = 0; - $data = Plaintext::getAttachmentData($body); + $data = BBCode::getAttachmentData($body); if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) || isset($data["type"])) { $objecttype = ACTIVITY_OBJ_BOOKMARK; $bookmark = 1; @@ -524,7 +524,7 @@ function item_post(App $a) { // Setting the object type if not defined before if (!$objecttype) { $objecttype = ACTIVITY_OBJ_NOTE; // Default value - $objectdata = Plaintext::getAttachedData($body); + $objectdata = BBCode::getAttachedData($body); if ($objectdata["type"] == "link") { $objecttype = ACTIVITY_OBJ_BOOKMARK; diff --git a/src/Content/Text/Plaintext.php b/src/Content/Text/BBCode.php similarity index 99% rename from src/Content/Text/Plaintext.php rename to src/Content/Text/BBCode.php index a72d20ea7a..b4a3106833 100644 --- a/src/Content/Text/Plaintext.php +++ b/src/Content/Text/BBCode.php @@ -1,6 +1,6 @@