aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-02-29 14:58:37 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-02-29 14:58:37 +0100
commitb71a3af4570ccf349804b9ffa151fc1d35287d88 (patch)
tree264c012a0c8ca28c4035666d35c547a829968a2a /include/bbcode.php
parentf5b8654818e63a0583e58caecc8a13c2d83c12d5 (diff)
parentfb33b4f2bcd18e63d311e6dba3aaa2ea5efdec3b (diff)
downloadvolse-hubzilla-b71a3af4570ccf349804b9ffa151fc1d35287d88.tar.gz
volse-hubzilla-b71a3af4570ccf349804b9ffa151fc1d35287d88.tar.bz2
volse-hubzilla-b71a3af4570ccf349804b9ffa151fc1d35287d88.zip
Merge remote-tracking branch 'friendica/master' into randomerror
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--[-rwxr-xr-x]include/bbcode.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 32053b4ec..cff26f5c8 100755..100644
--- 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]") !== false and strpos($Text, "[quote]") !== false 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]") !== false and strpos($Text, "[quote=") !== false 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);
@@ -285,3 +285,4 @@ function bbcode($Text,$preserve_nl = false) {
return $Text;
}
+