From 1f1540f0218d5ad8348700f74c60ad7ca95625b3 Mon Sep 17 00:00:00 2001 From: Jane Wagner Date: Thu, 18 Feb 2010 11:45:50 -0500 Subject: [PATCH] Bug 4215 OPAC "Search for title in" can fail with trailing slashes in title While configuring Search for Title In links, I found that some target sites can't process an incoming title search if the title being sent has a trailing slash. If the same search is sent without the trailing slash, it works fine. I modified opac-detail.pl to strip off the trailing slash (and space) for titles being sent to other sites. Signed-off-by: Galen Charlton --- opac/opac-detail.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 364066ea1e..87c29b9317 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -558,6 +558,8 @@ BEGIN $search_for_title =~ s/{AUTHOR}/$dat->{author}/g; $search_for_title =~ s/{TITLE}/$dat->{title}/g; $search_for_title =~ s/{ISBN}/$isbn/g; + $dat->{title} =~ s/\/+$//; # remove trailing slash + $dat->{title} =~ s/\s+$//; # remove trailing space $template->param('OPACSearchForTitleIn' => $search_for_title); }