From: Eric Wong Date: Sat, 5 Apr 2014 10:54:24 +0000 (+0000) Subject: view: use URI::Escape to escape URIs X-Git-Tag: v1.0.0~1309 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=18ffc0f236688ff99a7045de49f30a1bcb1f0ef1;p=public-inbox.git view: use URI::Escape to escape URIs CGI::escape is not a documented subroutine, so the chances of it going away are higher. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3d3b6b5e..3f3fea5a 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -3,7 +3,8 @@ package PublicInbox::View; use strict; use warnings; -use CGI qw/escapeHTML escape/; +use URI::Escape qw/uri_escape/; +use CGI qw/escapeHTML/; use Encode qw/decode encode/; use Encode::MIME::Header; @@ -111,7 +112,7 @@ sub trim_message_id { my ($mid) = @_; $mid =~ tr/<>//d; my $html = escapeHTML($mid); - my $href = escapeHTML(escape($mid)); + my $href = escapeHTML(uri_escape($mid)); ($html, $href); }