X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/79d2d44db2acc4aeaf60de17d86951e1d7259e1d..5738f30a2954705f7954e7fb99205f5a08d35ccb:/IkiWiki/Plugin/comments.pm?ds=inline diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 0ae9eefe3..d8318d3e3 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 {