From: Gabriel Wicke Date: Wed, 28 Apr 2004 22:32:44 +0000 (+0000) Subject: use content types to prevent IE from displaying this X-Git-Tag: 1.3.0beta1~211 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=decdde37429ccc70d03b138ccc81b57c771dbace;p=lhc%2Fweb%2Fwiklou.git use content types to prevent IE from displaying this --- 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(); }