diff options
author | Eric Wong <e@80x24.org> | 2014-04-28 04:50:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-28 04:51:46 +0000 |
commit | 59e7af124580f46bdb2dec21273607599ba1e8f9 (patch) | |
tree | 8c62802d9a9881d545a2d1493b9f8db4f5c6fbd8 /public-inbox.cgi | |
parent | 31b13cdcb3ab2a4f9332f2aab10fdda7dbbe296c (diff) | |
download | public-inbox-59e7af124580f46bdb2dec21273607599ba1e8f9.tar.gz |
uri_escape => uri_escape_utf8
We should be able to deal with URIs with non-ASCII characters in them. I only found this problem when looking at archives with non-English spam :x
Diffstat (limited to 'public-inbox.cgi')
-rwxr-xr-x | public-inbox.cgi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/public-inbox.cgi b/public-inbox.cgi index 26b0fc61..87cc6943 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -15,7 +15,7 @@ use warnings; use CGI qw(:cgi -nosticky); # PSGI/FastCGI/mod_perl compat use Encode qw(find_encoding); use PublicInbox::Config; -use URI::Escape qw(uri_escape uri_unescape); +use URI::Escape qw(uri_escape_utf8 uri_unescape); our $enc_utf8 = find_encoding('UTF-8'); our $LISTNAME_RE = qr!\A/([\w\.\-]+)!; our $pi_config; @@ -165,7 +165,8 @@ sub get_mid_html { return r404() unless $x; require PublicInbox::View; - my $mid_href = PublicInbox::Hval::ascii_html(uri_escape($ctx->{mid})); + my $mid_href = PublicInbox::Hval::ascii_html( + uri_escape_utf8($ctx->{mid})); my $pfx = "../f/$mid_href.html"; require Email::MIME; [ 200, [ 'Content-Type' => 'text/html' ], |