From 2a042e5ebe65dc93c7fed52ab6b1c4cf84c154bb Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Tue, 1 Mar 2011 22:53:24 +0100 Subject: [PATCH] Fixing problems with quotes when constructing z3950 search term Content-Type: text/plain; charset="utf-8" --- C4/Search.pm | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 3fff695..ff07c91 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2497,8 +2497,10 @@ sub z3950_search_args { my $array = []; for my $field (qw/ lccn isbn issn title author dewey subject /) { - my $encvalue = URI::Escape::uri_escape_utf8($bibrec->{$field}); - push @$array, { name=>$field, value=>$bibrec->{$field}, encvalue=>$encvalue } if defined $bibrec->{$field}; + my $val = $bibrec->{$field}; + $val =~ s/["']/\$1/g; + my $encvalue = URI::Escape::uri_escape_utf8($val); + push @$array, { name=>$field, value=>$val, encvalue=>$encvalue } if defined $bibrec->{$field}; } return $array; } -- 1.7.2.3