From: intrigeri Date: Wed, 12 Nov 2008 15:54:51 +0000 (+0100) Subject: po(mybestlink): fixed when fed with path beginning with / X-Git-Tag: 3.15~339 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/f4815e3b120f130ee0b88e3f301664f08df215a5 po(mybestlink): fixed when fed with path beginning with / Signed-off-by: intrigeri --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 45ed96c65..03ee9c33c 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -391,9 +391,11 @@ sub mybestlink ($$) { #{{{ my $link=shift; my $res=$origsubs{'bestlink'}->(masterpage($page), $link); + my $normres=$res; + $normres=~s#^/##; if (length $res && ($config{po_link_to} eq "current" || $config{po_link_to} eq "negotiated") - && istranslatable($res) + && istranslatable($normres) && istranslation($page)) { return $res . "." . lang($page); }