From: Fran Rogers Date: Mon, 15 Sep 2008 01:27:22 +0000 (+0000) Subject: Addendum to r40837: only validate/clean the body text, as we can assume the rest... X-Git-Tag: 1.31.0-rc.0~45298 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=a7c140b533eae8073a6b7269a982a62c3bb1408b;p=lhc%2Fweb%2Fwiklou.git Addendum to r40837: only validate/clean the body text, as we can assume the rest of the skin is valid. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index c3138422bf..53556b9845 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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