From 1a9fb8cb78fa69b56148c6c1a714a296a171d8f9 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 29 Mar 2017 17:01:11 -0400 Subject: [PATCH] Add ?safemode=1 to disable user JS/CSS Bug: T152169 Change-Id: I112b7abf1cfa1330b2d4e6150018aad14c00b654 --- includes/OutputPage.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 9ecfa23e2a..3cc9b76172 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2367,6 +2367,11 @@ class OutputPage extends ContextSource { if ( $this->mArticleBodyOnly ) { echo $this->mBodytext; } else { + // Enable safe mode if requested + if ( $this->getRequest()->getBool( 'safemode' ) ) { + $this->disallowUserJs(); + } + $sk = $this->getSkin(); // add skin specific modules $modules = $sk->getDefaultModules(); -- 2.20.1