From: Gabriel Wicke Date: Thu, 29 Apr 2004 10:04:57 +0000 (+0000) Subject: wrap user css and js in pre on view X-Git-Tag: 1.3.0beta1~199 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=3f946da1c20557d25f1ab0e309e70fbd3509c4b8;p=lhc%2Fweb%2Fwiklou.git wrap user css and js in pre on view --- diff --git a/includes/Article.php b/includes/Article.php index 8b1d25b3c6..55adf464ef 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -127,6 +127,13 @@ 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;