Question marks in series title facet links
authorLyon3 Team <koha@univ-lyon3.fr>
Mon, 8 Oct 2012 17:06:04 +0000 (19:06 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 25 Oct 2012 16:15:37 +0000 (18:15 +0200)
When series title include a question or exclamation mark, theese must be removed
to prevent search failure.

http://bugs.koha-community.org/show_bug.cgi?id=8888
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Before the patch: Series facet links with ! or ? return no results.
After the patch the same links return valid results.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Search.pm

index 7c20780..3a63fcd 100644 (file)
@@ -532,9 +532,9 @@ sub getRecords {
                             || ( $facets_info->{$link_value}->{'expanded'} ) )
                         {
 
-                      # Sanitize the link value ), ( will cause errors with CCL,
+                      # Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
                             my $facet_link_value = $one_facet;
-                            $facet_link_value =~ s/(\(|\))/ /g;
+                            $facet_link_value =~ s/[()!?¡¿؟]/ /g;
 
                             # fix the length that will display in the label,
                             my $facet_label_value = $one_facet;