@@ -, +, @@ - Create a biblio with title like "osteuropa:" or "osteuropa!" - Go the this biblio detail pages (cgi-bin/koha/catalogue/detail.pl) => Error - Apply bug 28316 and this one - test again --- Koha/SearchEngine/Zebra/QueryBuilder.pm | 13 +++++++++++++ catalogue/detail.pl | 6 ++++++ 2 files changed, 19 insertions(+) --- a/Koha/SearchEngine/Zebra/QueryBuilder.pm +++ a/Koha/SearchEngine/Zebra/QueryBuilder.pm @@ -73,4 +73,17 @@ sub build_authorities_query_compat { build_authorities_query(@_); } + +=head2 _clean_search_term + + my $term = $self->_clean_search_term($term); + +=cut + +sub _clean_search_term { + my ( $self, $term ) = @_; + + return $term; +} + 1; --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -55,6 +55,7 @@ use Koha::Patrons; use Koha::Virtualshelves; use Koha::Plugins; use Koha::SearchEngine::Search; +use Koha::SearchEngine::QueryBuilder; my $query = CGI->new(); @@ -132,8 +133,13 @@ if ( $xslfile ) { my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); + my $builder = Koha::SearchEngine::QueryBuilder->new( + { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); + my $cleaned_title = $biblio->title; $cleaned_title =~ tr|/||; + $cleaned_title = $builder->_clean_search_term($cleaned_title); + my $query = ( C4::Context->preference('UseControlNumber') and $record->field('001') ) ? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' --