Added charset property to HTTP Content-Type fields when serving CSS and JavaScript...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Apr 2011 20:48:50 +0000 (20:48 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Apr 2011 20:48:50 +0000 (20:48 +0000)
includes/resourceloader/ResourceLoader.php

index d0f6f6b..f8bd0d1 100644 (file)
@@ -360,9 +360,9 @@ class ResourceLoader {
                wfProfileOut( __METHOD__.'-getModifiedTime' );
 
                if ( $context->getOnly() === 'styles' ) {
-                       header( 'Content-Type: text/css' );
+                       header( 'Content-Type: text/css; charset=utf-8' );
                } else {
-                       header( 'Content-Type: text/javascript' );
+                       header( 'Content-Type: text/javascript; charset=utf-8' );
                }
                header( 'Last-Modified: ' . wfTimestamp( TS_RFC2822, $mtime ) );
                if ( $context->getDebug() ) {