aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-08-15 13:21:12 +0200
committerMario Vavti <mario@mariovavti.com>2018-08-15 13:21:12 +0200
commit2becc3273aa377574d566c052036f425105b2389 (patch)
treeff7a897190ea8f63b2aa67923ffb58fcd128d531 /include/bbcode.php
parent10c5b46e3bb4cfa76cbe7158f5eba54809cd0d79 (diff)
parentf4f610f1a3b3826f960e3db2026bf2204e939fe8 (diff)
downloadvolse-hubzilla-2becc3273aa377574d566c052036f425105b2389.tar.gz
volse-hubzilla-2becc3273aa377574d566c052036f425105b2389.tar.bz2
volse-hubzilla-2becc3273aa377574d566c052036f425105b2389.zip
Merge remote-tracking branch 'mike/master' into dev
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);