diff options
author | friendica <info@friendica.com> | 2012-06-28 16:05:28 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-28 16:05:28 -0700 |
commit | d7f35c81db264c3cbf3696a21d67b17f6aab8b09 (patch) | |
tree | 281ec029171fdded01b30224c0a89b4558e231af /include | |
parent | de93c61e0de2c4bd9c48ba15aae4855ddfabd0d5 (diff) | |
parent | 3bd0975c072f9ddbe96c1523b3c8a36424c4edbf (diff) | |
download | volse-hubzilla-d7f35c81db264c3cbf3696a21d67b17f6aab8b09.tar.gz volse-hubzilla-d7f35c81db264c3cbf3696a21d67b17f6aab8b09.tar.bz2 volse-hubzilla-d7f35c81db264c3cbf3696a21d67b17f6aab8b09.zip |
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'include')
-rw-r--r-- | include/bb2diaspora.php | 6 | ||||
-rw-r--r-- | include/bbcode.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 25edb28d7..77a5f5c2a 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -113,9 +113,9 @@ function bb2diaspora($Text,$preserve_nl = false) { // to define the closing tag for the list elements. So nested lists // are going to be flattened out in Diaspora for now $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && - (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && - (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { + while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) || + ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || + ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$endlessloop < 20)) { $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text); $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text); $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text); diff --git a/include/bbcode.php b/include/bbcode.php index ee31b4a1a..9071c767b 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -163,9 +163,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // handle nested lists $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && - (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && - (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { + while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) || + ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || + ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$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); |