ikiwiki/doc/bugs/removing_pages_with_utf8_ch...

29 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-01-18 18:25:13 +01:00
I have a page with the name "umläute". When I try to remove it, ikiwiki says:
Error: ?umläute does not exist
2010-01-18 18:38:05 +01:00
> I'm curious about the '?' in the "?umläute" message. Suggests that the
> filename starts with another strange character. Can I get a copy of a
> git repository or tarball containing this file? --[[Joey]]
2010-01-18 18:25:13 +01:00
I wrote the following patch, which seems to work on my machine. I'm running on FreeBSD 6.3-RELEASE with ikiwiki-3.20100102.3 and perl-5.8.9_3.
--- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100
+++ remove.pm 2010-01-18 17:49:39.000000000 +0100
@@ -193,6 +193,7 @@
# and that the user is allowed to edit(/remove) it.
my @files;
foreach my $page (@pages) {
+ $page = Encode::decode_utf8($page);
check_canremove($page, $q, $session);
# This untaint is safe because of the
2010-01-18 18:38:05 +01:00
> The problem with this patch is that, in a recent fix to the same
> plugin, I made `@pages` come from `$form->field("page")`, and
> that, in turn is already run through `decode_form_utf8` just above the
> code you patched. So I need to understand why that is apparently not
> working for you. (It works fine for me, even when deleting a file named
> "umläute" --[[Joey]]