test suite and partial fix for encoding issues in link renaming
[ikiwiki.git] / IkiWiki / Plugin / link.pm
index 515a62bced96396a906dd6c84e2c5ec0335c0200..529610710064e0a99c5ae29239f9a713534762fa 100644 (file)
@@ -91,7 +91,7 @@ sub renamepage (@) { #{{{
                my $linktext=$2;
                my $link=$linktext;
                if (bestlink($page, $2) eq $old) {
-                       $link=$new;
+                       $link=IkiWiki::pagetitle($new, 1);
                        if ($linktext =~ m/.*\/*?[A-Z]/) {
                                # preserve leading cap of last component
                                my @bits=split("/", $link);