* (bug 9252) Fix for tidy funkiness when using editintro mode
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 11 Sep 2007 18:22:37 +0000 (18:22 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 11 Sep 2007 18:22:37 +0000 (18:22 +0000)
RELEASE-NOTES
includes/GlobalFunctions.php
includes/OutputPage.php

index 08925f7..e6bf677 100644 (file)
@@ -46,6 +46,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11158) Fix escaping in API HTML-formatted JSON
 * Fixed notice when accessing special page without read permission and whitelist
   is not defined
+* (bug 9252) Fix for tidy funkiness when using editintro mode
+
 
 === API changes in 1.12 ===
 
index 67cc1f3..51c3121 100644 (file)
@@ -592,7 +592,7 @@ function wfMsgExt( $key, $options ) {
        } elseif ( in_array('parseinline', $options) ) {
                $string = $wgOut->parse( $string, true, true );
                $m = array();
-               if( preg_match( '/^<p>(.*)\n?<\/p>$/sU', $string, $m ) ) {
+               if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
                        $string = $m[1];
                }
        } elseif ( in_array('parsemag', $options) ) {
index 0646715..3f69fab 100644 (file)
@@ -351,10 +351,12 @@ class OutputPage {
                wfIncrStats('pcache_not_possible');
 
                $popts = $this->parserOptions();
-               $popts->setTidy($tidy);
+               $oldTidy = $popts->setTidy($tidy);
 
                $parserOutput = $wgParser->parse( $text, $title, $popts,
                        $linestart, true, $this->mRevisionId );
+                       
+               $popts->setTidy( $oldTidy );
 
                $this->addParserOutput( $parserOutput );