From 12f4787b67561be8afc78620823b81e290cddfaa Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 13 Aug 2018 23:11:10 -0700 Subject: issue with mdpost addon and archive.org links which contain a full url as a path/query component --- include/bbcode.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 345b5b025..6f22509e6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -953,12 +953,14 @@ function bbcode($Text, $options = []) { $Text = preg_replace_callback("/[^\^]\[url\]([$URLSearchString]*)\[\/url\]/ism", 'tryoembed', $Text); } } + if (strpos($Text,'[/url]') !== false) { $Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '#^$1', $Text); $Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '#^$2', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '$1', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $Text); } + if (strpos($Text,'[/zrl]') !== false) { $Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '#^$1', $Text); $Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '#^$2', $Text); -- cgit v1.2.3