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 /lib/PublicInbox/Hval.pm | |
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 'lib/PublicInbox/Hval.pm')
-rw-r--r-- | lib/PublicInbox/Hval.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm index 1a83cf10..a93e8c24 100644 --- a/lib/PublicInbox/Hval.pm +++ b/lib/PublicInbox/Hval.pm @@ -7,7 +7,7 @@ use strict; use warnings; use fields qw(raw); use Encode qw(find_encoding); -use URI::Escape qw(uri_escape); +use URI::Escape qw(uri_escape_utf8); my $enc_ascii = find_encoding('us-ascii'); @@ -52,7 +52,7 @@ sub ascii_html { } sub as_html { ascii_html($_[0]->{raw}) } -sub as_href { ascii_html(uri_escape($_[0]->{raw})) } +sub as_href { ascii_html(uri_escape_utf8($_[0]->{raw})) } sub raw { if (defined $_[1]) { |