From 3f946da1c20557d25f1ab0e309e70fbd3509c4b8 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 29 Apr 2004 10:04:57 +0000 Subject: [PATCH] wrap user css and js in pre on view --- includes/Article.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1