LP#1923225: clean up some double-escaping of HTML in record display
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 26 Apr 2021 21:33:51 +0000 (14:33 -0700)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 25 May 2021 14:34:21 +0000 (10:34 -0400)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2
Open-ILS/src/templates-bootstrap/opac/parts/record/series.tt2
Open-ILS/src/templates/opac/parts/record/series.tt2

index 4daf3be..efe3349 100755 (executable)
@@ -192,7 +192,6 @@ BLOCK render_all_contents;
         IF df AND attrs.hl.$df.size;
             filtered_hl_df = [];
             FOR hl_df IN attrs.hl.$df;
-                hl_df = hl_df | html;
                 filtered_hl_df.push(hl_df);
             END;
             content = '<!-- highlighted -->' _ filtered_hl_df.join('<br/>');
index 8f3e57c..ea93d55 100755 (executable)
@@ -7,12 +7,12 @@ BLOCK render_series;
     IF attrs.hl_display_fields.series_title.size;
     hl_field = attrs.hl_field;
         FOREACH s IN attrs.hl_display_fields.series_title;
-            search_term = s.value.replace('[#"^$\+\-,\.:;&|\[\]()]', ' ').replace('\s+$', '') | html;
+            search_term = s.value.replace('[#"^$\+\-,\.:;&|\[\]()]', ' ').replace('\s+$', '');
 
             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)
             );
-            filtered_hl_field = s.$hl_field | html;
+            filtered_hl_field = s.$hl_field;
             series = '<a href="' _ url _ '">' _ filtered_hl_field _ '</a> ';
             results.push(series);
         END;
index 473e754..be52dcb 100644 (file)
@@ -7,12 +7,12 @@ BLOCK render_series;
     IF attrs.hl_display_fields.series_title.size;
         hl_field = attrs.hl_field;
         FOREACH s IN attrs.hl_display_fields.series_title;
-            search_term = s.value.replace('[#"^$\+\-,\.:;&|\[\]()]', ' ').replace('\s+$', '') | html;
+            search_term = s.value.replace('[#"^$\+\-,\.:;&|\[\]()]', ' ').replace('\s+$', '');
     
             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)
             );
-            filtered_hl_field = s.$hl_field | html;
+            filtered_hl_field = s.$hl_field;
             series = '<a href="' _ url _ '">' _ filtered_hl_field _ '</a> ';
             results.push(series);
         END;