From fe1367b31e7711b52f103ade06eec538823d467c Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 16 Sep 2006 06:07:06 +0000 Subject: bug fixes schema changes i really hope nothing went wrong git-svn-id: file:///svn/phpbb/trunk@6371 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 70d6e13f4d..f6b3302dc1 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -505,7 +505,8 @@ class bbcode_firstpass extends bbcode do { $pos = strlen($in); - for ($i = 0; $i < strlen($tok); ++$i) + $tok_len = strlen($tok); + for ($i = 0; $i < $tok_len; ++$i) { $tmp_pos = strpos($in, $tok{$i}); @@ -523,7 +524,7 @@ class bbcode_firstpass extends bbcode if ($tok == ']') { // if $tok is ']' the buffer holds a tag - if ($buffer == '/list' && sizeof($list_end_tags)) + if (strtolower($buffer) == '/list' && sizeof($list_end_tags)) { $out .= array_pop($list_end_tags) . ']'; $tok = '['; @@ -539,6 +540,12 @@ class bbcode_firstpass extends bbcode { array_push($list_end_tags, '/list:o:' . $this->bbcode_uid); } + + if (strtolower(substr($buffer, 0, 4)) == 'list') + { + $buffer = 'list' . substr($buffer, 4, $pos); + } + $out .= $buffer . ':' . $this->bbcode_uid . ']'; $tok = '['; } -- cgit v1.2.1