From baaffb7a904f0e0a448eb938a15051fafc419870 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 12 Apr 2007 09:22:44 +0000 Subject: [PATCH] CSS charset header must be emitted, thanks to SADtg --- docs/NEWS | 3 +++ serendipity.css.php | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index c1a0a1d..1df22d8 100644 --- 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) diff --git a/serendipity.css.php b/serendipity.css.php index b7019ed..92c4a9f 100644 --- a/serendipity.css.php +++ b/serendipity.css.php @@ -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)) { -- 2.39.5