Commit 415a5d12 authored by jake%acutex.net's avatar jake%acutex.net

Fix for bug 42810 - Bugzilla would choke if your product name contained a ' mark.

Patch by Christian Reis <kiko@async.com.br> r= justdave@syndicomm.com, caillon@returnzero.com
parent 21c2f341
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment