X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/fe5c48f3a002df1867d045b3767900f83817038a..e0832eefeaf790bc2bfc2b98c24413c4514557b4:/IkiWiki/Plugin/polygen.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/polygen.pm b/IkiWiki/Plugin/polygen.pm index 82fd575a7..966b6cb51 100644 --- a/IkiWiki/Plugin/polygen.pm +++ b/IkiWiki/Plugin/polygen.pm @@ -11,8 +11,7 @@ use IkiWiki; use File::Find; sub import { #{{{ - IkiWiki::hook(type => "preprocess", id => "polygen", - call => \&preprocess); + hook(type => "preprocess", id => "polygen", call => \&preprocess); } # }}} sub preprocess (@) { #{{{ @@ -22,6 +21,7 @@ sub preprocess (@) { #{{{ # Sanitize parameters $grammar =~ IkiWiki::basename($grammar); + $grammar =~ s/[^A-Za-z0-9]//g; $grammar =~ s/\.grm$//; $grammar .= '.grm'; $symbol =~ s/[^A-Za-z0-9]//g if defined $symbol;