includes/wikiengine/parse_mediawiki.php
changeset 1134 4fdd92da4fe8
parent 1131 adfbe522c95f
child 1138 a7b490f0c418
--- a/includes/wikiengine/parse_mediawiki.php	Mon Nov 09 09:18:29 2009 -0500
+++ b/includes/wikiengine/parse_mediawiki.php	Wed Nov 11 23:44:10 2009 -0500
@@ -219,6 +219,14 @@
     
     $tokens = array();
     $rand_id = sha1(microtime() . mt_rand());
+    
+    // Temporary hack to fix crashes under win32. Sometime I'll write a loop based
+    // parser for this whole section. Maybe. Perhaps the Apache folks will fix their
+    // Windows binaries first.
+    if ( PHP_OS == 'WIN32' || PHP_OS == 'WINNT' )
+    {
+      $regex = str_replace("(?: (?R) | .*? )*", "(?: .*? )", $regex);
+    }
     if ( preg_match_all($regex, $text, $matches) )
     {
       foreach ( $matches[0] as $i => $match )
@@ -234,7 +242,7 @@
     }
     
     // die('<pre>' . htmlspecialchars($text) . '</pre>');
-    
+	
     RenderMan::tag_unstrip('_paragraph_bypass', $text, $_nw, true);
     
     // This is potentially a hack. It allows the parser to stick in <_paragraph_bypass> tags