don't die if [/code] comes before [code]

This commit is contained in:
Shish 2012-01-31 12:24:29 +00:00
parent f0fa99ed10
commit 1cd4f867b5

View File

@ -142,7 +142,7 @@ class BBCode extends FormatterExtension {
$start = strpos($text, "[code]");
if($start === false) break;
$end = strpos($text, "[/code]");
$end = strpos($text, "[/code]", $start);
if($end === false) break;
$beginning = substr($text, 0, $start);