X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=4e19e64a27e20e423427d02a3fdf93045d616553;hp=638830fe39a4a966c9c59902d44699b9c9097375;hb=e9efcd432994620d4294f322ff04152134a1c1f4;hpb=8bd25a641ce759ff9273f102632f39faef691d26 diff --git a/blosxom.cgi b/blosxom.cgi index 638830f..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; };