From a7c140b533eae8073a6b7269a982a62c3bb1408b Mon Sep 17 00:00:00 2001 From: Fran Rogers Date: Mon, 15 Sep 2008 01:27:22 +0000 Subject: [PATCH] Addendum to r40837: only validate/clean the body text, as we can assume the rest of the skin is valid. --- includes/OutputPage.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 -- 2.20.1