mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
fix bbcode links for bang-tag groups
This commit is contained in:
parent
95fe674c76
commit
f676875b6b
2 changed files with 3 additions and 1 deletions
|
@ -1767,6 +1767,7 @@ function bbcode($Text, $options = [])
|
|||
$Text = preg_replace("/\#\[url\=([$URLSearchString]*?)\](.*?)\[\/url\]/ism", '#<a class="hashtag" 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", '@$1<span class="h-card"><a class="u-url mention" href="$2" ' . $target . ' rel="nofollow noopener" >$3</a></span>', $Text);
|
||||
$Text = preg_replace("/\!(\!?)\[url\=([$URLSearchString]*?)\](.*?)\[\/url\]/ism", '!$1<span class="h-card"><a class="u-url mention" href="$2" ' . $target . ' rel="nofollow noopener" >$3</a></span>', $Text);
|
||||
$Text = preg_replace("/\[url\=([$URLSearchString]*?)\](.*?)\[\/url\]/ism", '<a href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
|
||||
}
|
||||
|
||||
|
@ -1778,6 +1779,7 @@ function bbcode($Text, $options = [])
|
|||
$Text = preg_replace("/\#\[zrl\=([$URLSearchString]*?)\](.*?)\[\/zrl\]/ism", '#<a class="zrl hashtag" href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[zrl\]([$URLSearchString]*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" ' . $target . ' rel="nofollow noopener" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\@(\!?)\[zrl\=([$URLSearchString]*?)\](.*?)\[\/zrl\]/ism", '@$1<span class="h-card"><a class="zrl u-url mention" href="$2" ' . $target . ' rel="nofollow noopener" >$3</a></span>', $Text);
|
||||
$Text = preg_replace("/\!(\!?)\[zrl\=([$URLSearchString]*?)\](.*?)\[\/zrl\]/ism", '!$1<span class="h-card"><a class="zrl u-url mention" href="$2" ' . $target . ' rel="nofollow noopener" >$3</a></span>', $Text);
|
||||
$Text = preg_replace("/\[zrl\=([$URLSearchString]*?)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
|
||||
}
|
||||
|
||||
|
|
|
@ -1836,7 +1836,7 @@ function prepare_body(&$item, $attach = false, $opts = false)
|
|||
$s .= prepare_text('[summary]​' . $item['summary'] . '[/summary]​' . $item['body'], $item['mimetype'], $opts);
|
||||
} else {
|
||||
if ($item['html']) {
|
||||
$s .= smilies($item['html']);
|
||||
$s .= smilies(zidify_links($item['html']));
|
||||
} else {
|
||||
$s .= prepare_text($item['body'], $item['mimetype'], $opts);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue