aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzottel <github@zottel.net>2013-09-24 05:39:37 -0700
committerzzottel <github@zottel.net>2013-09-24 05:39:37 -0700
commite9a51797a273b979901b5958cc26acf9ad02011d (patch)
tree5465d7882740f14bb6216a5d59eb040b98cf1d01
parent5ee339c99e7a19fa7af064446b0d21973e9a22c0 (diff)
parent5092ae9e2bd5edfc67a82c56e803bdcb203386f8 (diff)
downloadvolse-hubzilla-e9a51797a273b979901b5958cc26acf9ad02011d.tar.gz
volse-hubzilla-e9a51797a273b979901b5958cc26acf9ad02011d.tar.bz2
volse-hubzilla-e9a51797a273b979901b5958cc26acf9ad02011d.zip
Merge pull request #153 from zzottel/master
Fix observer=1 tag. Using only observer without =1 won't work anymore
-rw-r--r--include/bbcode.php4
1 files changed, 2 insertions, 2 deletions
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);
}
}