From: jake%acutex.net <> Date: Sat, 1 Sep 2001 06:51:35 +0000 (+0000) Subject: Fix for bug 42810 - Bugzilla would choke if your product name contained a ' mark. X-Git-Tag: bugzilla-2.14.1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=415a5d128205e8d6b6749f962cf25c81316389f9;p=thirdparty%2Fbugzilla.git Fix for bug 42810 - Bugzilla would choke if your product name contained a ' mark. Patch by Christian Reis r= justdave@syndicomm.com, caillon@returnzero.com --- diff --git a/globals.pl b/globals.pl index dcfbce883a..af3c26a3de 100644 --- a/globals.pl +++ b/globals.pl @@ -409,7 +409,7 @@ sub GenerateCode { $result = ""; foreach my $k (sort { uc($a) cmp uc($b)} eval("keys $name")) { $result .= GenerateCode("\$" . substr($name, 1) . - "{'" . $k . "'}"); + "{" . PerlQuote($k) . "}"); } return $result; } else { diff --git a/query.cgi b/query.cgi index 1013b7af0a..10b644b634 100755 --- a/query.cgi +++ b/query.cgi @@ -347,7 +347,7 @@ sub make_js_array { foreach my $p ( @prods ) { # join each element with a "," case-insensitively alpha sorted if ( $data{$p} ) { - $ret .= $arr."['$p'] = ["; + $ret .= $arr."[".SqlQuote($p)."] = ["; # the SqlQuote() protects our 's. my @tmp = map( SqlQuote( $_ ), @{ $data{$p} } ); # do the join on a sorted, quoted list