Fix for bug 31374: reintroduce recursive unstrip as in r27667, somehow omitted during...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 6 Oct 2011 00:07:45 +0000 (00:07 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 6 Oct 2011 00:07:45 +0000 (00:07 +0000)
includes/parser/StripState.php

index c7bd1e7..357dc2c 100644 (file)
@@ -90,10 +90,13 @@ class StripState {
 
                wfProfileIn( __METHOD__ );
                $this->tempType = $type;
-               $out = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text );
+               do {
+                       $oldText = $text;
+                       $text = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text );
+               } while ( $text !== $oldText );
                $this->tempType = null;
                wfProfileOut( __METHOD__ );
-               return $out;
+               return $text;
        }
 
        /**