From e8c1b6c3167be79d4f3df798316cf62faf5f72c1 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 29 Apr 2004 23:13:19 +0000 Subject: [PATCH] moved the css special case to view(), old versions had the \ in them --- includes/Article.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 55adf464ef..f9d076d4ef 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -127,13 +127,6 @@ class Article { wfProfileOut( $fname ); return $rv; } - } else if ( - # wrap user css and user js in pre - $this->mTitle->getNamespace() == Namespace::getUser() && - preg_match("/\\/[\\w]+\\.(css|js)$/", $this->mTitle->getDBkey()) - ) - { - $this->mContent = '
'.htmlspecialchars($this->mContent)."\n
"; } wfProfileOut( $fname ); return $this->mContent; @@ -508,8 +501,14 @@ class Article { } $wgLinkCache->preFill( $this->mTitle ); - - if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){ + + # wrap user css and user js in pre and don't parse + if ( + $this->mTitle->getNamespace() == Namespace::getUser() && + preg_match("/\\/[\\w]+\\.(css|js)$/", $this->mTitle->getDBkey()) + ) { + $wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); + } else if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){ $wgOut->addWikiText( $text, true, $this ); } else { $wgOut->addWikiText( $text ); -- 2.20.1