Bug 9239 QA follow-up: escape quotes in searches
This patch escapes quotes in searches for those rare instances where there is a literal quote inside a search term. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
c716c28fa6
commit
241656582c
1 changed files with 2 additions and 0 deletions
|
@ -54,6 +54,7 @@ sub target_syntax {
|
|||
if (@{$self->phrases}) {
|
||||
foreach my $phrase (@{$self->phrases}) {
|
||||
if ($phrase) {
|
||||
$phrase =~ s/"/\\"/g;
|
||||
$pqf .= ' @or ' x (scalar(@fields) - 1);
|
||||
foreach my $attributes (@fields) {
|
||||
$pqf .= $attributes->{'attr_string'} . ($attributes->{'4'} ? '' : ' @attr 4=1') . ' "' . $phrase . '" ';
|
||||
|
@ -66,6 +67,7 @@ sub target_syntax {
|
|||
if (ref($atom)) {
|
||||
$atom_content = $atom->target_syntax($server);
|
||||
if ($atom_content) {
|
||||
$atom_content =~ s/"/\\"/g;
|
||||
$pqf .= ' @or ' x (scalar(@fields) - 1);
|
||||
foreach my $attributes (@fields) {
|
||||
$attributes->{'attr_string'} ||= '';
|
||||
|
|
Loading…
Reference in a new issue