Addendum to r40837: only validate/clean the body text, as we can assume the rest...
authorFran Rogers <krimpet@users.mediawiki.org>
Mon, 15 Sep 2008 01:27:22 +0000 (01:27 +0000)
committerFran Rogers <krimpet@users.mediawiki.org>
Mon, 15 Sep 2008 01:27:22 +0000 (01:27 +0000)
includes/OutputPage.php

index c313842..53556b9 100644 (file)
@@ -901,8 +901,10 @@ class OutputPage {
                        $this->addScriptFile( 'rightclickedit.js' );
                }
 
+               $this->mBodytext = StringUtils::cleanForCharset( $this->mBodytext, $wgOutputEncoding );
+
                # Buffer output; final headers may depend on later processing
-               ob_start( array( 'OutputPage', 'cleanCallback') );
+               ob_start();
 
                $wgRequest->response()->header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
                $wgRequest->response()->header( 'Content-language: '.$wgContLanguageCode );
@@ -924,13 +926,6 @@ class OutputPage {
                wfProfileOut( __METHOD__ );
        }
 
-       public static function cleanCallback( $s ) {
-               wfProfileIn( __METHOD__ );
-               $s = StringUtils::cleanForCharset( $s, $wgOutputEncoding );
-               wfProfileOut( __METHOD__ );
-               return $s;
-       }
-
        /**
         * @todo document
         * @param string $ins