This doesn't actually do the job; browsers aren't this picky about their JavaScript, and many aren't picky about CSS either. Further, this actually breaks internal JS such as the gen=js mode.
* Don't show non-functional toolbar buttons on Opera 7 anymore
* (bug 9151) Fix relative subpage links with section fragments
* (bug 10560) Adding a space between category letter heading and "continues"
-* Don't allow retrieving non-JavaScript/CSS pages with "text/css" or "text/javascript"
- MIME types
* (bug 1629) Stop section edit links from being shoved down by other floats
* (bug 4650) Keep impossibly large/small counts off Special:Statistics
* (bug 10608) PHP notice when installing with PostgreSQL
}
function getRawText() {
- global $wgUser, $wgOut, $wgRequest, $wgJsMimeType;
-
- /* Disable retrieving content pages as raw js/css */
- $dangerousTypes = array( $wgJsMimeType, 'text/css' );
- if ( in_array( $this->mContentType, $dangerousTypes ) &&
- !($this->mTitle->isCssOrJsPage() || $this->mTitle->isCssJsSubpage() ) )
- return '/* Page type not compatible with requested MIME type. */';
-
+ global $wgUser, $wgOut, $wgRequest;
if($this->mGen) {
$sk = $wgUser->getSkin();
$sk->initPage($wgOut);