diff options
-rw-r--r-- | globals.pl | 2 | ||||
-rwxr-xr-x | query.cgi | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/globals.pl b/globals.pl index dcfbce883..af3c26a3d 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 { @@ -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 |