X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/70dc0355bd547158ae29381f77eb6d809e0fefaa..c256a53fcbc8fb6faafefd71dcdb0059db085dd9:/IkiWiki/Plugin/comments.pm?ds=inline 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 {