]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/Markdown.php
Fix video display problems with videos with parameters
[friendica.git] / src / Content / Text / Markdown.php
index 0e6846ebf5166e22e25abd02c2fe0f7d50761df1..ac598d0fc4826dbcfcd575cb9a90fb2e2ad210d3 100644 (file)
@@ -9,8 +9,7 @@ namespace Friendica\Content\Text;
 use Friendica\BaseObject;
 use Friendica\Model\Contact;
 use Michelf\MarkdownExtra;
-
-require_once  'include/html2bbcode.php';
+use Friendica\Content\Text\HTML;
 
 /**
  * Friendica-specific usage of Markdown
@@ -87,14 +86,14 @@ class Markdown extends BaseObject
                // Escaping the hash tags
                $s = preg_replace('/\#([^\s\#])/', '#$1', $s);
 
-               $s = Markdown::convert($s);
+               $s = self::convert($s);
 
                $regexp = "/@\{(?:([^\}]+?); )?([^\} ]+)\}/";
                $s = preg_replace_callback($regexp, ['self', 'diasporaMention2BBCodeCallback'], $s);
 
                $s = str_replace('#', '#', $s);
 
-               $s = html2bbcode($s);
+               $s = HTML::toBBCode($s);
 
                // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
                $s = str_replace('♲', html_entity_decode('♲', ENT_QUOTES, 'UTF-8'), $s);