From 59e7af124580f46bdb2dec21273607599ba1e8f9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Apr 2014 04:50:17 +0000 Subject: 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 --- lib/PublicInbox/Hval.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Hval.pm') 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]) { -- cgit v1.2.3-24-ge0c7