X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=4e19e64a27e20e423427d02a3fdf93045d616553;hp=685274659872314cbbbcd98707fa035354413a0a;hb=e9efcd432994620d4294f322ff04152134a1c1f4;hpb=4765205bf6e8c276bc0bbb277cba30dff8a5ee67 diff --git a/blosxom.cgi b/blosxom.cgi index 6852746..4e19e64 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -510,10 +510,10 @@ sub generate { # Define default interpolation subroutine $interpolate = sub { - package blosxom; my $template = shift; - $template =~ s/(\$\w+(?:::\w+)*)/"defined $1 ? $1 : ''"/gee; + # Interpolate scalars, namespaced scalars, and hash/hashref scalars + $template =~ s/(\$\w+(?:::\w+)*(?:(?:->)?{(['"]?)[-\w]+\2})?)/"defined $1 ? $1 : ''"/gee; return $template; }; @@ -726,7 +726,7 @@ html content_type text/html; charset=$blog_encoding html head html head html head -html head +html head html head $blog_title $path_info_da $path_info_mo $path_info_yr html head html head