ein Verzeichnis unterhalb von $template_dir angeben
zu koennen. Die alte Funktionsweise bleibt unangetastet. Die
neue Syntax lautet <%include DIR/SUBDIR/FILENAME%>.
# check for <%include filename%>
if (/\s*<%include /) {
- # get the filename
+ # get the directory/filename
chomp $var;
$var =~ s/\s*<%include (.+?)%>/$1/;
- # mangle filename
- $var =~ s/(\/|\.\.)//g;
+ # mangle filename on basedir
+ $var =~ s/^(\/|\.\.)//g;
# prevent the infinite loop!
next if ($self->{"$var"});