From 41e755222544ee0733098db20cecad5ffe6319fb Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 1 Apr 2015 12:30:03 -0700 Subject: open bbcode tag --- include/bbcode.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 6f7ef8973..e97a96f87 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -668,6 +668,17 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { "
" . $t_wrote . "
$2
", $Text); + + $endlessloop = 0; + while ((strpos($Text, "[/open]")!== false) and (strpos($Text, "[open=") !== false) and (++$endlessloop < 20)) { + $rnd = mt_rand(); + $Text = preg_replace("/\[open=(.*?)\](.*?)\[\/open\]/ism", + "
$1
$2
", + $Text); + } + + + // Declare the format for [quote] layout $QuoteLayout = '
$1
'; -- cgit v1.2.3