From 2d1453cfbb56bcad6bba07eb0ad3b2aa08849ba5 Mon Sep 17 00:00:00 2001 From: Gavin Carr Date: Tue, 18 Sep 2007 05:29:26 +0000 Subject: [PATCH] Add $blog_encoding back to default content_type flavours, and simple content_type interpolation. --- blosxom.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blosxom.cgi b/blosxom.cgi index ad19c9a..1ddc9df 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -338,6 +338,7 @@ else { my $content_type = (&$template($path_info,'content_type',$flavour)); $content_type =~ s!\n.*!!s; + $content_type =~ s/(\$\w+(?:::)?\w*)/"defined $1 ? $1 : ''"/gee; $header = {-type=>$content_type}; print generate('dynamic', $path_info, "$path_info_yr/$path_info_mo_num/$path_info_da", $flavour, $content_type); @@ -512,7 +513,7 @@ sub nice_date { # Default HTML and RSS template bits __DATA__ -html content_type text/html +html content_type text/html; charset=$blog_encoding html head html head @@ -545,7 +546,7 @@ html foot html foot html foot -rss content_type text/xml +rss content_type text/xml; charset=$blog_encoding rss head rss head -- 2.39.5