Bug 9239 QA follow-up: fix overeager quote escaping
The quote escaping added two follow-ups ago was a little too eager, and escaped perfectly valid quotes in some instances. This patch moves the escaping deeper into the loop so that no needed quotes will be escaped. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Test plan included here, as this is the last patch in the series: All tests pass. OPAC Simple search - Keyword searches using boolean operators || and && - OK - Pubdate searches using pubdate() - OK - Using different search options: keyword, title, etc. - OK Facets - limit to available from a query parser simple search - OK - Other facets - OK Advanced search - Date range search - OK - Itemtype limits - OK - Language limit - OK - Combining various serach options with and without 'more' options and using boolean operators - OK Authorities - Searching for partial and complete names like "M", "Benedictus" works. - OK - Biblio count isc correct - OK - Links to linked biblios work. - OK. INTRANET Staged MARC import - Import records using various matching points - OK Serials - Search for a serial in subscription form - OK Acquisitions - Search for existing record from basket - OK Authorities - Running the linker script with QP on works. - OK - Searching for authorities works. - OK - Biblio count isc correct - OK - Links to linked biblios work. - OK. NOTE: As agreed with Jared in chat, query parser should be off by default for the next release. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
8dcec411a4
commit
181dab6699
2 changed files with 4 additions and 2 deletions
|
@ -67,7 +67,6 @@ 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'} ||= '';
|
||||
|
|
|
@ -22,7 +22,10 @@ directly.
|
|||
sub target_syntax {
|
||||
my ($self, $server) = @_;
|
||||
|
||||
return ' "' . $self->content . '" ';
|
||||
my $content = $self->content;
|
||||
$content =~ s/"/\\"/g;
|
||||
|
||||
return ' "' . $content . '" ';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue