From: Lebbeous Fogle-Weekley Date: Wed, 10 Apr 2013 17:23:28 +0000 (-0400) Subject: TPAC Turn dashes into space in subject search links for better matching X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e0749b6b80ac59cac4abc523bb876810dee9afff;p=evergreen%2Fpines.git TPAC Turn dashes into space in subject search links for better matching Thanks to Dan Wells for finding a bug and fixing it for demonstration purposes. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 index 9a1cf50dc8..3914908990 100644 --- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 @@ -44,7 +44,7 @@ IF code.match('[vxyz]'); " > "; END; # at this point, we actually have a partial term to use. single_term = subfield.textContent | html; - all_terms.push(subfield.textContent.replace('[#"^$\+\-,\.:;&|\[\]()]', '')); + all_terms.push(subfield.textContent.replace('\-', ' ').replace('[#"^$\+,\.:;&|\[\]()]', '')); total_term = all_terms.join(" ").replace('\s+$', ''); %] [% single_term %]