From 5092ae9e2bd5edfc67a82c56e803bdcb203386f8 Mon Sep 17 00:00:00 2001 From: zottel Date: Tue, 24 Sep 2013 14:35:47 +0200 Subject: Fix observer=1 tag. Using only observer without =1 won't work anymore now. --- include/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 7d7bf1de4..9b9c954c1 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -222,10 +222,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $observer = $a->get_observer(); if (strpos($Text,'[/observer]') !== false) { if ($observer) { - $Text = preg_replace("/\[observer(\=1)?\](.*?)\[\/observer\]/ism", '$2', $Text); + $Text = preg_replace("/\[observer\=1\](.*?)\[\/observer\]/ism", '$1', $Text); $Text = preg_replace("/\[observer\=0\].*?\[\/observer\]/ism", '', $Text); } else { - $Text = preg_replace("/\[observer(\=1)?\].*?\[\/observer\]/ism", '', $Text); + $Text = preg_replace("/\[observer\=1\].*?\[\/observer\]/ism", '', $Text); $Text = preg_replace("/\[observer\=0\](.*?)\[\/observer\]/ism", '$1', $Text); } } -- cgit v1.2.3