]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
po(nicepagetitle): append translation status to links to translated pages
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 0ae9eefe320f2b634781375b8c57927844a8d2cc..d8318d3e3afa309e7893fd994a8bbf8730fe0c3a 100644 (file)
@@ -198,8 +198,17 @@ sub preprocess {
                        $pagestate{$page}{meta}{author} = $params{claimedauthor};
                }
 
                        $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 {
                }
        }
        else {