X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=1ddc9dfdd461883d1fd8c6ed1f26477c5502ba60;hp=eef5b113ae7ce0965b9c8cb0a4e20589d5d8d961;hb=2d1453cfbb56bcad6bba07eb0ad3b2aa08849ba5;hpb=c82629ad386ed5242e126d7e146d1c3bc97cc634 diff --git a/blosxom.cgi b/blosxom.cgi index eef5b11..1ddc9df 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -338,6 +338,9 @@ 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); } @@ -376,10 +379,6 @@ sub generate { # override the default built-in interpolate subroutine my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('interpolate') and defined($tmp = $plugin->interpolate()) and $interpolate = $tmp and last; } - # Content_type - $content_type=&$interpolate($content_type); - $header = {-type=>$content_type}; - # Head my $head = (&$template($currentdir,'head',$flavour)); @@ -547,7 +546,7 @@ html foot html foot html foot -rss content_type text/xml ; charset=$blog_encoding +rss content_type text/xml; charset=$blog_encoding rss head rss head