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');
}
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]) {
use strict;
use warnings;
use PublicInbox::Hval;
-use URI::Escape qw/uri_escape/;
+use URI::Escape qw/uri_escape_utf8/;
use Encode qw/find_encoding/;
use Encode::MIME::Header;
use Email::MIME::ContentType qw/parse_content_type/;
my $subj = $mime->header('Subject') || '';
$subj = "Re: $subj" unless $subj =~ /\bRe:/;
- my $irp = uri_escape($mime->header_obj->header_raw('Message-ID') || '');
+ my $irp = uri_escape_utf8(
+ $mime->header_obj->header_raw('Message-ID') || '');
delete $cc{$to};
- $to = uri_escape($to);
- $subj = uri_escape($subj);
+ $to = uri_escape_utf8($to);
+ $subj = uri_escape_utf8($subj);
- my $cc = uri_escape(join(',', values %cc));
+ my $cc = uri_escape_utf8(join(',', values %cc));
my $href = "mailto:$to?In-Reply-To=$irp&Cc=${cc}&Subject=$subj";
'<a href="' . ascii_html($href) . '">reply</a>';
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;
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' ],