aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2013-09-24 14:35:47 +0200
committerzottel <github@zottel.net>2013-09-24 14:35:47 +0200
commit5092ae9e2bd5edfc67a82c56e803bdcb203386f8 (patch)
tree5465d7882740f14bb6216a5d59eb040b98cf1d01 /include/bbcode.php
parent5ee339c99e7a19fa7af064446b0d21973e9a22c0 (diff)
downloadvolse-hubzilla-5092ae9e2bd5edfc67a82c56e803bdcb203386f8.tar.gz
volse-hubzilla-5092ae9e2bd5edfc67a82c56e803bdcb203386f8.tar.bz2
volse-hubzilla-5092ae9e2bd5edfc67a82c56e803bdcb203386f8.zip
Fix observer=1 tag. Using only observer without =1 won't work anymore now.
Diffstat (limited to 'include/bbcode.php')
-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);
}
}