aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-08-13 23:11:10 -0700
committerzotlabs <mike@macgirvin.com>2018-08-13 23:11:10 -0700
commit12f4787b67561be8afc78620823b81e290cddfaa (patch)
treefdbcfe491003107018a286bb112a869ffe2856d6 /include/bbcode.php
parentf15c1c4e54a49d1e76747ca5e3034ca2cef909aa (diff)
downloadvolse-hubzilla-12f4787b67561be8afc78620823b81e290cddfaa.tar.gz
volse-hubzilla-12f4787b67561be8afc78620823b81e290cddfaa.tar.bz2
volse-hubzilla-12f4787b67561be8afc78620823b81e290cddfaa.zip
issue with mdpost addon and archive.org links which contain a full url as a path/query component
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php2
1 files changed, 2 insertions, 0 deletions
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", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" ' . $target . ' rel="nofollow noopener" >$1</a>', $Text);
$Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" ' . $target . ' rel="nofollow noopener" >$1</a>', $Text);
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
}
+
if (strpos($Text,'[/zrl]') !== false) {
$Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" ' . $target . ' rel="nofollow noopener" >$1</a>', $Text);
$Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);