]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
allow emailuser to be called when there is no %config set
[git.ikiwiki.info.git] / IkiWiki.pm
index a70773506a7468bf6289d51d195845f9e0d3895d..8244fa99607aaf42d5dae9c76d7fe76db6018ab7 100644 (file)
@@ -1471,7 +1471,9 @@ sub emailuser ($) {
        if (defined $user && $user =~ m/(.+)@/) {
                my $nick=$1;
                # remove any characters from not allowed in wiki files
-               $nick=~s/[^$config{wiki_file_chars}]/_/g;
+               # support use w/o %config set
+               my $chars = defined $config{wiki_file_chars} ? $config{wiki_file_chars} : "-[:alnum:]+/.:_";
+               $nick=~s/[^$chars]/_/g;
                return $nick;
        }
        return;