]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/Plaintext.php
Removed and replaced deprecated functionalities
[friendica.git] / src / Content / Text / Plaintext.php
index e177ac387c9514534100da0ecdf6c93fedc3b566..be93ac4cdba76a859d3416c8d6925e0ff2e4994a 100644 (file)
@@ -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(string $msg, int $limit, int $uid = 0)
+       public static function shorten(string $msg, int $limit, int $uid = 0):string
        {
                $ellipsis = html_entity_decode("…", 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'));