(Bug #27467) preload can leave UNIQ
authorMark A. Hershberger <mah@users.mediawiki.org>
Sat, 19 Feb 2011 19:18:02 +0000 (19:18 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Sat, 19 Feb 2011 19:18:02 +0000 (19:18 +0000)
Patch to fix from P.Copp

includes/parser/Parser.php

index ad22310..7573041 100644 (file)
@@ -329,8 +329,8 @@ class Parser {
 
                /**
                 * A converted title will be provided in the output object if title and
-                * content conversion are enabled, the article text does not contain 
-                * a conversion-suppressing double-underscore tag, and no 
+                * content conversion are enabled, the article text does not contain
+                * a conversion-suppressing double-underscore tag, and no
                 * {{DISPLAYTITLE:...}} is present. DISPLAYTITLE takes precedence over
                 * automatic link conversion.
                 */
@@ -483,7 +483,9 @@ class Parser {
 
                $flags = PPFrame::NO_ARGS | PPFrame::NO_TEMPLATES;
                $dom = $this->preprocessToDom( $text, self::PTD_FOR_INCLUSION );
-               return $this->getPreprocessor()->newFrame()->expand( $dom, $flags );
+               $text = $this->getPreprocessor()->newFrame()->expand( $dom, $flags );
+               $text = $this->mStripState->unstripBoth( $text );
+               return $text;
        }
 
        /**
@@ -4095,7 +4097,7 @@ class Parser {
                # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags
                $text = $this->replaceVariables( $text );
 
-               # This works almost by chance, as the replaceVariables are done before the getUserSig(), 
+               # This works almost by chance, as the replaceVariables are done before the getUserSig(),
                # which may corrupt this parser instance via its wfMsgExt( parsemag ) call-
 
                # Signatures
@@ -4984,9 +4986,9 @@ class Parser {
        }
 
        /**
-        * This function returns $oldtext after the content of the section 
+        * This function returns $oldtext after the content of the section
         * specified by $section has been replaced with $text.
-        * 
+        *
         * @param $text String: former text of the article
         * @param $section Numeric: section identifier
         * @param $text String: replacing text