use warnings;
use strict;
use IkiWiki 2.00;
+use Encode;
sub import { #{{{
hook(type => "getsetup", id => "recentchanges", call => \&getsetup);
# page they link to is deleted, or newly created, or
# changes for whatever reason. So this CGI handles that
# dynamic linking stuff.
- my $page=$cgi->param("page");
+ my $page=decode_utf8($cgi->param("page"));
if (!defined $page) {
error("missing page parameter");
}
>> same happens, by the way, when using meta-redir to a page with high bytes in
>> the name.)
>>
+>>> The problem is that all cgi inputs have to be explicitly decoded to
+>>> utf-8, which I've now done for `recentchange_link`.
+>>>
+>>> I cannot, however, reproduce a problem with meta redir. Here it
+>>> generated the following html, which redirected the browser ok:
+>>> <meta http-equiv="refresh" content="0; URL=./../รข/" />
+>>
>> update: i've had a look at the git options; you could run git with '-z' (NUL
>> termination) in the `git_commit_info` function; this would require some
>> changes in `parse_diff_tree`, but otherwise completely eliminate the
>> problems with git escaping.
>>
+>>> If you would like to develop a patch to that effect, I'd be glad to
+>>> drop the current nasty code.
+>>
>> --[[chrysn]]