From 21993ab00a853d2cf7afb314bd2b6bacb0439ecc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Fri, 1 Apr 2011 09:16:51 +0200 Subject: [PATCH] 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 Signed-off-by: Chris Cormack --- C4/AuthoritiesMarc.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 1eeb96454e..0122ca88b3 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -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; -- 2.39.5