]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 42810 - Bugzilla would choke if your product name contained a ' mark.
authorjake%acutex.net <>
Sat, 1 Sep 2001 06:51:35 +0000 (06:51 +0000)
committerjake%acutex.net <>
Sat, 1 Sep 2001 06:51:35 +0000 (06:51 +0000)
Patch by Christian Reis <kiko@async.com.br>
r= justdave@syndicomm.com, caillon@returnzero.com

globals.pl
query.cgi

index dcfbce883a172636a2f328e6ab97dc7398fd2a3f..af3c26a3de3189207bcddd9b408e06ea511c0c92 100644 (file)
@@ -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 {
index 1013b7af0a561d18ebe9a635906119adcb12b17b..10b644b634f0b1ab3429974cd602b5bee2e77d48 100755 (executable)
--- 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