CSS charset header must be emitted, thanks to SADtg
authorgarvinhicking <garvinhicking>
Thu, 12 Apr 2007 09:22:44 +0000 (09:22 +0000)
committergarvinhicking <garvinhicking>
Thu, 12 Apr 2007 09:22:44 +0000 (09:22 +0000)
docs/NEWS
serendipity.css.php

index c1a0a1d7deaadcf4298f7041b6ae3e78350fbc83..1df22d82af8035114b2142da0c35e5bc08292f93 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * Add proper charset to CSS stylesheet. Thanks to SADtg 
+      (garvinhicking)
+
     * Strip tags from comments also in RSS-Feeds for comments, thanks to
       tmix from the forums (garvinhicking)
 
index b7019ede7c9631804858a5b325c3f2062915c6cf..92c4a9f52c74c0bdfc49422f5c2ae782cf466ae4 100644 (file)
@@ -8,7 +8,9 @@ define('IN_upgrader', true);
 define('IN_CSS', true);
 
 session_cache_limiter('public');
-include_once('serendipity_config.inc.php');
+if (!defined('S9Y_FRAMEWORK')) {
+    include('serendipity_config.inc.php');
+}
 
 if (!isset($css_mode)) {
     if (!empty($serendipity['GET']['css_mode'])) {
@@ -33,7 +35,7 @@ switch($css_mode) {
 
 function serendipity_printStylesheet($file, $dir = '') {
     global $serendipity;
-    return str_replace(
+    return "/* $dir  */\n" . str_replace(
              array(
                '{TEMPLATE_PATH}',
                '{LANG_DIRECTION}'
@@ -55,7 +57,7 @@ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
     header('Pragma:');
     header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time()+3600));
 }
-header('Content-type: text/css');
+header('Content-type: text/css; charset=' . LANG_CHARSET);
 
 if (IS_installed === false) {
     if (file_exists(S9Y_INCLUDE_PATH . 'templates/' . $serendipity['defaultTemplate'] . '/' . $css_file)) {