Bug 5549 : Fix a couple of date issues from testing
[koha.git] / help.pl
diff --git a/help.pl b/help.pl
index 18d27dd..97f3462 100755 (executable)
--- a/help.pl
+++ b/help.pl
@@ -32,7 +32,9 @@ our $refer = $query->param('url');
 $refer = $query->referer()  if !$refer || $refer eq 'undefined';
 
 $refer =~ /koha\/(.*)\.pl/;
-my $from = "help/$1.tt";
+my $file = $1;
+$file =~ s/[^a-zA-Z0-9_\-\/]*//g;
+my $from = "help/$file.tt";
 
 my $template = C4::Templates::gettemplate($from, 'intranet', $query);
 $template->param( referer => $refer );