r99062 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99061‎ | r99062 | r99063 >
Date:00:07, 6 October 2011
Author:tstarling
Status:ok (Comments)
Tags:needs-parsertests 
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/parser/StripState.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/StripState.php
@@ -90,10 +90,13 @@
9191
9292 wfProfileIn( __METHOD__ );
9393 $this->tempType = $type;
94 - $out = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text );
 94+ do {
 95+ $oldText = $text;
 96+ $text = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text );
 97+ } while ( $text !== $oldText );
9598 $this->tempType = null;
9699 wfProfileOut( __METHOD__ );
97 - return $out;
 100+ return $text;
98101 }
99102
100103 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r99067* (bug 31374) Pass relevant additional parameters for action=raw on Special:M...brion01:10, 6 October 2011
r99071MFT r99062: reintroduce recursive unstriptstarling01:23, 6 October 2011
r106012Bug 31374: regression test made by Brion...hashar11:16, 13 December 2011
r107900MFT r99062reedy17:08, 3 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r27667* Refactored the parser. See my huge entry in RELEASE-NOTES for details....tstarling10:55, 20 November 2007
r82645* Rewrote StripState to not use ReplacementArray. The memory usage of FSS was...tstarling06:58, 23 February 2011

Comments

#Comment by Bawolff (talk | contribs)   08:06, 1 January 2012

I'm re-tagging this as 1.18 - It seems like this would be an important enough issue to be back-ported for 1.18.1. given it breaks some of the fancy stuff with the Cite extension, and thats pretty commonly used outside of Wikipedia

Status & tagging log