aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-02-23 20:51:44 +0100
committerMichael <icarus@dabo.de>2012-02-23 20:51:44 +0100
commit311e35731c52102cbce3befc6343f179080ad38c (patch)
tree3651936f5862a6b708e38b733f6c009429b7e52c
parente34a648cadaf79e1749f220b9e26c52c5e295819 (diff)
downloadvolse-hubzilla-311e35731c52102cbce3befc6343f179080ad38c.tar.gz
volse-hubzilla-311e35731c52102cbce3befc6343f179080ad38c.tar.bz2
volse-hubzilla-311e35731c52102cbce3befc6343f179080ad38c.zip
bbcode.php: A list or quote at the beginning wasn't detected
-rwxr-xr-xinclude/bbcode.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index d639b0c39..eef1cde1f 100755
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -151,7 +151,7 @@ function bbcode($Text,$preserve_nl = false) {
// handle nested lists
$endlessloop = 0;
- while (strpos($Text, "[/list]") and strpos($Text, "[list") and (++$endlessloop < 20)) {
+ while ((strpos($Text, "[/list]") !== false) and (strpos($Text, "[list") !== false) and (++$endlessloop < 20)) {
$Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
@@ -194,7 +194,7 @@ function bbcode($Text,$preserve_nl = false) {
// Check for [quote] text
// handle nested quotes
$endlessloop = 0;
- while (strpos($Text, "[/quote]") and strpos($Text, "[quote]") and (++$endlessloop < 20))
+ while ((strpos($Text, "[/quote]") !== false) and (strpos($Text, "[quote]") !== false) and (++$endlessloop < 20))
$Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text);
// Check for [quote=Author] text
@@ -203,7 +203,7 @@ function bbcode($Text,$preserve_nl = false) {
// handle nested quotes
$endlessloop = 0;
- while (strpos($Text, "[/quote]") and strpos($Text, "[quote=") and (++$endlessloop < 20))
+ while ((strpos($Text, "[/quote]")!== false) and (strpos($Text, "[quote=") !== false) and (++$endlessloop < 20))
$Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism",
"<blockquote><strong>" . $t_wrote . "</strong> $2</blockquote>",
$Text);