diff options
author | Alvaro Herrera | 2009-05-27 19:52:45 +0000 |
---|---|---|
committer | Alvaro Herrera | 2009-05-27 19:52:45 +0000 |
commit | 07ccc23596316c4c54c90f9067d37b18f703d054 (patch) | |
tree | 7b77c9de89cb2c1e6db25cf04bff0601f9d9a56c | |
parent | 2736cdf26180d4cb7c94392dfc46173b7d354728 (diff) |
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
-rwxr-xr-x | archives/bin/msgid2link.pl | 5 |
1 files changed, 2 insertions, 3 deletions
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<a href="http://archives.postgresql.org/message-id/$link">$ulink</a>$trailer <<a href="http://archives.postgresql.org/msgtxt.php?id=$link">text/plain</a>>$eol}; $changes = 1; } |