From: Alvaro Herrera Date: Wed, 27 May 2009 19:52:45 +0000 (+0000) Subject: Fix ad-hoc URI escaping to be more robusy, per Gavin Sherry (by way of X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=07ccc23596316c4c54c90f9067d37b18f703d054;p=pgweb-old.git Fix ad-hoc URI escaping to be more robusy, per Gavin Sherry (by way of Stefan Kaltenbrunner) git-svn-id: file:///Users/dpage/pgweb/svn-repo/trunk@2500 8f5c7a92-453e-0410-a47f-ad33c8a6b003 --- diff --git a/archives/bin/msgid2link.pl b/archives/bin/msgid2link.pl index efe96fb6..6b786008 100755 --- a/archives/bin/msgid2link.pl +++ b/archives/bin/msgid2link.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -w use strict; +use URI::Escape; sub sysdie { die "$0: @_: $!\n" } @@ -43,12 +44,10 @@ while (my $in_filename = glob("msg*.php")) s/\(at\)/@/g; m/^(.*<)(.*)(>)(<\/li>)$/; my $lead = $1; - my $link = $2; + my $link = uri_escape($2); my $ulink = $2; my $trailer = $3; my $eol = $4; - # do we need more HTML de-escaping? - $link =~ s/&/&/g; print $OUT qq{$lead$ulink$trailer <text/plain>$eol}; $changes = 1; }