Escape the double quotes in authority search queries to prevent errors.

Before this fix, any search with double-quotes would return an error
500.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Frédérick Capovilla 2011-04-01 09:16:51 +02:00 committed by Chris Cormack
parent 4d4e4abfae
commit 21993ab00a

View file

@ -246,6 +246,7 @@ sub SearchAuthorities {
} else {
$attr .=" \@attr 5=1 \@attr 4=6 ";## Word list, right truncated, anywhere
}
@$value[$i] =~ s/"/\\"/g; # Escape the double-quotes in the search value
$attr =$attr."\"".@$value[$i]."\"";
$q2 .=$attr;
$dosearch=1;