LP1923225 Followup: Record Subjects, Contents, and Summary
authorJason Boyer <JBoyer@equinoxOLI.org>
Fri, 30 Jul 2021 19:15:31 +0000 (15:15 -0400)
committerJason Boyer <JBoyer@equinoxOLI.org>
Fri, 30 Jul 2021 19:21:43 +0000 (15:21 -0400)
These 3 parts of the TPAC still had highlighted display fields being
run through the html filter, double-escaping them.

Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Open-ILS/src/templates/opac/parts/record/contents.tt2
Open-ILS/src/templates/opac/parts/record/subjects.tt2
Open-ILS/src/templates/opac/parts/record/summary.tt2

index c9c3856..38f6271 100644 (file)
@@ -190,12 +190,7 @@ BLOCK render_all_contents;
         content = '';
         df = cont.display_field;
         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/>');
+            content = '<!-- highlighted -->' _ attrs.hl.$df.join('<br/>');
         ELSE;
             content = PROCESS render_contents(xpath=cont.xpath);
         END;
index 9011853..f987125 100644 (file)
@@ -91,7 +91,7 @@
         '<span property="about"><!-- highlighted -->';
         %]<a href="[%-
                mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms))
-        -%]">[% s.$f | html %]</a> [%-
+        -%]">[% s.$f %]</a> [%-
         '</span>';
     END;
 %]
index 9105e4b..232f239 100644 (file)
@@ -362,16 +362,9 @@ END;
         [%- END %]
     [%- END %]
     [%- IF attrs.hl.physical_description.size %]
-    [%-
-        filtered_hl_phys_desc = [];
-        FOR hl_phys_desc IN attrs.hl.physical_description;
-            hl_phys_desc = hl_phys_desc | html;
-            filtered_hl_phys_desc.push(hl_phys_desc);
-        END;
-    -%]
     <li id='rdetail_phys_desc'>
         <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
-        <span class='rdetail_value' highlighted='true'>[% filtered_hl_phys_desc.join('<br/>') %]</span>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.physical_description.join('<br/>') %]</span>
     </li>
     [%- ELSIF attrs.phys_desc %]
     <li id='rdetail_phys_desc'>
@@ -382,7 +375,7 @@ END;
     [%- IF attrs.hl.edition %]
     <li id='rdetail_edition'>
         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
-        <span class='rdetail_value' highlighted='true'>[% attrs.hl.edition | html %]</span>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.edition %]</span>
     [%- ELSIF attrs.edition %]
     <li id='rdetail_edition'>
         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
@@ -407,7 +400,7 @@ END;
     [%- IF attrs.hl.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
-        <span class='rdetail_value' highlighted='true'>[% attrs.hl.publisher | html %]</span>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.publisher %]</span>
     </li>
     [%- ELSIF attrs.publisher %]
     <li id='rdetail_publisher'>