diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-19 17:06:25 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-19 17:06:25 -0400 |
commit | 84efd3e00ff91cd486c15b4291abe400e61afd7b (patch) | |
tree | 3c08675d086309e5035d4a13cf8c5d765709bc6a /IkiWiki.pm | |
parent | fecfa539885a7a7e2a7af73eafcac6f68326ead3 (diff) | |
download | ikiwiki-84efd3e00ff91cd486c15b4291abe400e61afd7b.tar ikiwiki-84efd3e00ff91cd486c15b4291abe400e61afd7b.tar.gz |
allow emailuser to be called when there is no %config set
ikiwiki-hosting needs to do this
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index a70773506..8244fa996 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; |