]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/Plaintext.php
Blanks replaced
[friendica.git] / src / Content / Text / Plaintext.php
index 45c35cb172c9e4c7410f258f0d2d17ca89fb15c3..2fcff72d59230364b2eaba245c081e01feface76 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -36,7 +36,7 @@ class Plaintext
         *
         * @todo For Twitter URLs aren't shortened, but they have to be calculated as if.
         */
-       public static function shorten($msg, $limit, $uid = 0)
+       public static function shorten(string $msg, int $limit, int $uid = 0):string
        {
                $ellipsis = html_entity_decode("&#x2026;", ENT_QUOTES, 'UTF-8');
 
@@ -175,7 +175,7 @@ class Plaintext
                        }
                }
 
-               $html = BBCode::convert($post['text'] . ($post['after'] ?? ''), false, $htmlmode);
+               $html = BBCode::convertForUriId($item['uri-id'], $post['text'] . ($post['after'] ?? ''), $htmlmode);
                $msg = HTML::toPlaintext($html, 0, true);
                $msg = trim(html_entity_decode($msg, ENT_QUOTES, 'UTF-8'));