X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FBBCode.php;h=2070d22d131d534b43f3040e6b6683f50f8d3ea1;hb=d609d70bd23a0665fa5dd138630a30731589e56d;hp=62ad04a4348529cd8668e3b2bc971e1a458abd58;hpb=870fd1a52bffb79861a3c8298f4c0e91c92428f2;p=friendica.git diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 62ad04a434..2070d22d13 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -2355,7 +2355,7 @@ class BBCode DI::profiler()->startRecording('rendering'); $ret = []; - self::performWithEscapedTags($string, ['noparse', 'pre', 'code', 'img'], function ($string) use (&$ret) { + self::performWithEscapedTags($string, ['noparse', 'pre', 'code', 'img', 'attachment'], function ($string) use (&$ret) { // Convert hashtag links to hashtags $string = preg_replace('/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism', '#$2 ', $string); @@ -2599,7 +2599,7 @@ class BBCode // Bypass attachment if parse url for a comment if (!$tryAttachment) { DI::profiler()->stopRecording(); - return "\n" . '[url=' . $url . ']' . $siteinfo['title'] . '[/url]'; + return "\n" . '[url=' . $url . ']' . ($siteinfo['title'] ?? $url) . '[/url]'; } // Format it as BBCode attachment