From decdde37429ccc70d03b138ccc81b57c771dbace Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 28 Apr 2004 22:32:44 +0000 Subject: [PATCH] use content types to prevent IE from displaying this --- includes/RawPage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/RawPage.php b/includes/RawPage.php index 56662faaa8..4c2d03a038 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -9,12 +9,12 @@ class RawPage { function RawPage( $article ) { global $wgRequest, $wgInputEncoding; - $allowedCTypes = array('text/plain', 'text/javascript', 'text/css'); + $allowedCTypes = array('text/x-wiki', 'text/javascript', 'text/css', 'application/x-zope-edit'); $this->mArticle =& $article; $this->mTitle =& $article->mTitle; $ctype = $wgRequest->getText( 'ctype' ); if(empty($ctype) or !in_array($ctype, $allowedCTypes)) { - $this->mContentType = 'text/plain'; + $this->mContentType = 'text/x-wiki'; } else { $this->mContentType = $ctype; } @@ -27,9 +27,7 @@ class RawPage { header( "Content-type: ".$this->mContentType.'; charset='.$this->mCharset ); # allow the client to cache this for 24 hours header( 'Cache-Control: s-maxage=0, max-age=86400' ); - $parser=new Parser(); - $raw = $this->getrawtext(); - echo $parser->removeHTMLtags( $raw ); + echo $this->getrawtext(); wfAbruptExit(); } -- 2.20.1