* (bug 10309) Initialise parser state properly in extractSections(), fixes
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Jun 2007 16:00:11 +0000 (16:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Jun 2007 16:00:11 +0000 (16:00 +0000)
  some cases where section edits broke because tags were improperly stripped

RELEASE-NOTES
includes/Parser.php

index cc97ddb..f500a30 100644 (file)
@@ -177,6 +177,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Signature dates for Japanese and other languages including weekday now show
   the correct day to match the rest of the time in local time.
 * Escape the output of magic variables that return page name or part of it
+* (bug 10309) Initialise parser state properly in extractSections(), fixes
+  some cases where section edits broke because tags were improperly stripped
+
 
 == API changes since 1.10 ==
 
index 20d8e93..2793645 100644 (file)
@@ -4609,6 +4609,10 @@ class Parser
         *                for "replace", the whole page with the section replaced.
         */
        private function extractSections( $text, $section, $mode, $newtext='' ) {
+               # I.... _hope_ this is right.
+               # Otherwise, sometimes we don't have things initialized properly.
+               $this->clearState();
+               
                # strip NOWIKI etc. to avoid confusion (true-parameter causes HTML
                # comments to be stripped as well)
                $stripState = new StripState;