diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2008-12-26 14:07:25 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2008-12-26 14:07:25 -0500 |
commit | 6f1539320b7b2701d391c9921177b31898767bb7 (patch) | |
tree | 8e05fa07bdb2b9262d4083f3c35502cd28e77028 /IkiWiki | |
parent | 914c839ceb02fdbb36a49aa6548dc95beaf59ea4 (diff) | |
parent | 9db06329c98e1a390bbb6323de02dc7e2f45f1f8 (diff) | |
download | ikiwiki-6f1539320b7b2701d391c9921177b31898767bb7.tar ikiwiki-6f1539320b7b2701d391c9921177b31898767bb7.tar.gz |
Merge branch 'master' into next
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index c9c7b2ed4..ddaa70732 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -198,8 +198,17 @@ sub preprocess { $pagestate{$page}{meta}{author} = $params{claimedauthor}; } - if (defined $params{url} and safeurl($params{url})) { - $pagestate{$page}{meta}{authorurl} = $params{url}; + if (defined $params{url}) { + my $url=$params{url}; + + eval q{use URI::Heuristic}; + if (! $@) { + $url=URI::Heuristic::uf_uristr($url); + } + + if (safeurl($url)) { + $pagestate{$page}{meta}{authorurl} = $url; + } } } else { |