From 18ffc0f236688ff99a7045de49f30a1bcb1f0ef1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 5 Apr 2014 10:54:24 +0000 Subject: view: use URI::Escape to escape URIs CGI::escape is not a documented subroutine, so the chances of it going away are higher. --- lib/PublicInbox/View.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/View.pm') 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); } -- cgit v1.2.3-24-ge0c7