From: Tim Starling Date: Sun, 7 Aug 2005 14:33:40 +0000 (+0000) Subject: and tags X-Git-Tag: 1.6.0~2049 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=002b7db854b77603c27fcf0f50efb8bb924be877;p=lhc%2Fweb%2Fwiklou.git and tags --- diff --git a/includes/Parser.php b/includes/Parser.php index 65b71313aa..106f889fec 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -762,6 +762,10 @@ class Parser $fname = 'Parser::internalParse'; wfProfileIn( $fname ); + # Remove tags and sections + $text = strtr( $text, array( '' => '', '' => '') ); + $text = preg_replace( '/.*?<\/includeonly>/s', '', $text ); + $text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ) ); $text = $this->replaceVariables( $text, $args ); @@ -2215,12 +2219,12 @@ class Parser } $title = Title::newFromText( $part1, $ns ); - if ($title) { - $interwiki = Title::getInterwikiLink($title->getInterwiki()); - if ($interwiki != '' && $title->isTrans()) { - return $this->scarytransclude($title, $interwiki); - } - } + if ($title) { + $interwiki = Title::getInterwikiLink($title->getInterwiki()); + if ($interwiki != '' && $title->isTrans()) { + return $this->scarytransclude($title, $interwiki); + } + } if ( !is_null( $title ) && !$title->isExternal() ) { # Check for excessive inclusion @@ -2233,11 +2237,11 @@ class Parser $found = true; $noparse = true; $isHTML = true; - $this->mOutput->setCacheTime( -1 ); + $this->disableCache(); } } else { $article = new Article( $title ); - $articleContent = $article->getContentWithoutUsingSoManyDamnGlobals(); + $articleContent = $article->fetchContent(); if ( $articleContent !== false ) { $found = true; $text = $articleContent; @@ -2288,6 +2292,10 @@ class Parser $this->mTemplatePath[$part1] = 1; if( $this->mOutputType == OT_HTML ) { + # Remove sections and tags + $text = preg_replace( '/.*?<\/noinclude>/s', '', $text ); + $text = strtr( $text, array( '' => '' , '' => '' ) ); + # Strip ,
, etc.
 				$text = $this->strip( $text, $this->mStripState );
 				$text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ), $this->mAssocArgs );
 			}