r40839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40838‎ | r40839 | r40840 >
Date:01:27, 15 September 2008
Author:krimpet
Status:old
Tags:
Comment:
Addendum to r40837: only validate/clean the body text, as we can assume the rest of the skin is valid.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -901,8 +901,10 @@
902902 $this->addScriptFile( 'rightclickedit.js' );
903903 }
904904
 905+ $this->mBodytext = StringUtils::cleanForCharset( $this->mBodytext, $wgOutputEncoding );
 906+
905907 # Buffer output; final headers may depend on later processing
906 - ob_start( array( 'OutputPage', 'cleanCallback') );
 908+ ob_start();
907909
908910 $wgRequest->response()->header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
909911 $wgRequest->response()->header( 'Content-language: '.$wgContLanguageCode );
@@ -924,13 +926,6 @@
925927 wfProfileOut( __METHOD__ );
926928 }
927929
928 - public static function cleanCallback( $s ) {
929 - wfProfileIn( __METHOD__ );
930 - $s = StringUtils::cleanForCharset( $s, $wgOutputEncoding );
931 - wfProfileOut( __METHOD__ );
932 - return $s;
933 - }
934 -
935930 /**
936931 * @todo document
937932 * @param string $ins

Follow-up revisions

RevisionCommit summaryAuthorDate
r40861Revert r40837, r40839, r40840 (bug 332 - broken UTF-8)...brion17:51, 15 September 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40837Fix for bug #332 - all UTF-8 output is now cleaned of invalid forms as define...krimpet00:42, 15 September 2008