From e0749b6b80ac59cac4abc523bb876810dee9afff Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 10 Apr 2013 13:23:28 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/parts/record/subjects.tt2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 %] -- 2.11.0