From 60eb6603bf5701f33cf81dbb492508002c751a80 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 27 Oct 2019 17:41:47 +0000 Subject: [PATCH 1/3] (hopefully) fix preview issue with tags on Mastodon --- src/Content/Text/BBCode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 8a029fe534..fc5c772d5b 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1746,9 +1746,9 @@ class BBCode extends BaseObject * - [url=]#[/url] */ $text = preg_replace_callback("/(?:#\[url\=.*?\]|\[url\=.*?\]#)(.*?)\[\/url\]/ism", function($matches) { - return '#' + . '" class="tag" rel="tag" title="' . XML::escape($matches[1]) . '">' . XML::escape($matches[1]) . ''; }, $text); From 30a6231f118fc1385131ae0e5ab69b83d7e6ec8c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 27 Oct 2019 17:45:43 +0000 Subject: [PATCH 2/3] Fix indentation --- src/Content/Text/BBCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index fc5c772d5b..9169c91d07 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1746,7 +1746,7 @@ class BBCode extends BaseObject * - [url=]#[/url] */ $text = preg_replace_callback("/(?:#\[url\=.*?\]|\[url\=.*?\]#)(.*?)\[\/url\]/ism", function($matches) { - return '#%s
', $data['url'], $data['title']); } else {