LP#1757526: escape more catalog data (MFHD edition)
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / issues-mfhd.tt2
index 15b9ab9..bd6bb97 100644 (file)
         };
 
         FOREACH serial IN ctx.mfhd_summaries;
-%]
-            <tr>
-                <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
-            </tr>
-[%
+            printed_mfhd_header = 0;
             FOREACH type IN mfhd.keys;
                 NEXT UNLESS serial.$type.size;
-%]
-            <tr>
-                <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
-                <td class="rdetail-mfhd-contents">[%
-                    FOR thing IN serial.$type;
-                        thing.join(", ");
-                    END %]</td>
-            </tr>
+                IF !printed_mfhd_header; %]
+                <tr>
+                    <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) | html %]</td>
+                </tr>
+                [% printed_mfhd_header = 1;
+                END; %]
+                <tr>
+                    <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
+                    <td class="rdetail-mfhd-contents">[%
+                        FOR thing IN serial.$type;
+                            thing.join(", ") | html;
+                        END %]</td>
+                </tr>
+            [% END;
+            IF printed_mfhd_header; %]
+                <tr>
+                    <td class="rdetail-mfhd-foot" colspan="2"> </td>
+                </tr>
+            [% END; %]
         [% END %]
-            <tr>
-                <td class="rdetail-mfhd-foot" colspan="2"> </td>
-            </tr>
-    [% END %]
         </tbody></table>
     </div>
 [% END %]