From: Tim Starling Date: Thu, 6 Oct 2011 00:07:45 +0000 (+0000) Subject: Fix for bug 31374: reintroduce recursive unstrip as in r27667, somehow omitted during... X-Git-Tag: 1.31.0-rc.0~27248 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=d6bae9f79cfe7c238d6a3e1a618b09cdef93f6ea;p=lhc%2Fweb%2Fwiklou.git Fix for bug 31374: reintroduce recursive unstrip as in r27667, somehow omitted during the refactor in r82645. StripState::merge() is still wrong, but it's currently unused on Wikimedia, so this will do as a temporary patch. --- diff --git a/includes/parser/StripState.php b/includes/parser/StripState.php index c7bd1e77d9..357dc2c8bf 100644 --- a/includes/parser/StripState.php +++ b/includes/parser/StripState.php @@ -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; } /**