From: Jeff Davis Date: Mon, 9 Nov 2020 23:45:24 +0000 (-0800) Subject: LP#1902965: HTML filter on Bootstrap OPAC search results and record display X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c31d052576e7ff961c6d973b5a1e9297fc4d3152;p=Evergreen.git LP#1902965: HTML filter on Bootstrap OPAC search results and record display Signed-off-by: Jeff Davis Signed-off-by: Jason Boyer Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/body.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/body.tt2 index 081e1034b1..b884b1b45a 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/body.tt2 @@ -7,10 +7,10 @@ %]
[%- FOREACH link IN args.links.sameAs; %] - + [%- END; %] [%- FOREACH link IN args.links.exampleOfWork; %] - + [%- END; %] [%- INCLUDE "opac/parts/record/navigation.tt2" %] [%- IF ctx.bib_is_dead %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 index 022bdd723b..4daf3be527 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 @@ -190,7 +190,12 @@ BLOCK render_all_contents; content = ''; df = cont.display_field; IF df AND attrs.hl.$df.size; - content = '' _ attrs.hl.$df.join('
'); + filtered_hl_df = []; + FOR hl_df IN attrs.hl.$df; + hl_df = hl_df | html; + filtered_hl_df.push(hl_df); + END; + content = '' _ filtered_hl_df.join('
'); ELSE; content = PROCESS render_contents(xpath=cont.xpath); END; diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2 index c6894574a8..8f3e57cc19 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2 @@ -12,7 +12,8 @@ BLOCK render_series; url = mkurl(ctx.opac_root _ '/results', { qtype=>'series', query=>search_term }, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms) ); - series = '' _ s.$hl_field _ ' '; + filtered_hl_field = s.$hl_field | html; + series = '' _ filtered_hl_field _ ' '; results.push(series); END; ELSE; diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 index 7f0f58e11f..9128190245 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 @@ -91,7 +91,7 @@ ''; %][% s.$f %] [%- + -%]">[% s.$f | html %] [%- ''; END; %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 index 8d4d810831..37fcdf626e 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 @@ -28,12 +28,12 @@ ctx.metalinks.push(' END; %] - [% attrs.title _ ' Cover Image' %] [% ELSE %] [% attrs.title _ ' Cover Image' %] [%- END %] @@ -56,7 +56,7 @@ ctx.metalinks.push('
-

[% IF attrs.hl.title; attrs.hl.title; ELSE; attrs.title_extended | html; END %]

+

[% IF attrs.hl.title; attrs.hl.title | html; ELSE; attrs.title_extended | html; END %]

[%- FOR link880 IN attrs.graphic_titles; FOR alt IN link880.graphic; @@ -77,7 +77,7 @@ ctx.metalinks.push('