Fixed lockup on unclosed HTML tags in wikiformat_process_block() 1.0.6pl1
authorDan
Sat, 22 Aug 2009 13:31:09 -0400
changeset 332 ec1c93c59c2c
parent 331 f0eee185880a
child 333 2896d4208312
Fixed lockup on unclosed HTML tags in wikiformat_process_block()
includes/functions.php
--- a/includes/functions.php	Sat Aug 22 13:30:39 2009 -0400
+++ b/includes/functions.php	Sat Aug 22 13:31:09 2009 -0400
@@ -1933,7 +1933,7 @@
         $prev = ( $i == 0 ) ? '' : $html{ $i - 1 };
         $next = ( ( $i + 1 ) == $len ) ? '' : $html { $i + 1 };
         $tag_name .= $chr;
-        if ( $next == '>' )
+        if ( $next == '>' || $i > strlen($html) )
           break;
       }
       // echo '<br />';