]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-10-31 00:55:31 by cjwatson]
authorcjwatson <>
Thu, 31 Oct 2002 08:55:31 +0000 (00:55 -0800)
committercjwatson <>
Thu, 31 Oct 2002 08:55:31 +0000 (00:55 -0800)
'&' needs to be escaped to '&amp;' in HREF attributes too; see HTML 4.01
section 5.3.2.

cgi/common.pl

index 1e255ee7fae2d7c449fd1567179152d00786f028..043c795dc5dd40421fbf8a000ebe6de74b5f5c5b 100644 (file)
@@ -216,9 +216,9 @@ sub urlsanit {
     my $url = shift;
     $url =~ s/%/%25/g;
     $url =~ s/\+/%2b/g;
-    my %saniarray = ('<','lt', '>','gt', '"','quot');
+    my %saniarray = ('<','lt', '>','gt', '&','amp', '"','quot');
     my $out;
-    while ($url =~ m/[<>"]/) {
+    while ($url =~ m/[<>&"]/) {
         $out .= $`. '&'. $saniarray{$&}. ';';
         $url = $';
     }