[%- FOREACH row = HEADER_ROWS %]
<tr>
[% FOREACH col = row %]
- <th class="listheading">[% IF col.link %]<a href="[% col.link %]">[% END %][% col.text %][% IF col.link %][% IF col.show_sort_indicator %]<img border="0" src="image/[% IF col.sort_indicator_direction %]down[% ELSE %]up[% END %].png">[% END %]</a>[% ELSE %][% IF col.show_sort_indicator %]<img src="image/[% IF col.sort_indicator_direction %]down[% ELSE %]up[% END %].png">[% END %][% END %]</th>
+ <th class="listheading"
+ [%- IF col.align %] align="[% HTML.escape(col.align) %]"[% END -%]
+ [%- IF col.colspan && col.colspan > 1 %] colspan="[% HTML.escape(col.colspan) %]"[% END -%]
+ >
+ [%- IF col.link -%]<a href="[% col.link %]">[%- END -%]
+ [%- col.text -%]
+ [%- IF col.show_sort_indicator -%]<img border="0" src="image/[% IF col.sort_indicator_direction %]down[% ELSE %]up[% END %].png">[%- END -%]
+ [%- IF col.link -%]</a>[%- END -%]
+ </th>
[% END %]
</tr>
[%- END %]
[%- FOREACH col = row.COLUMNS %]
<td[% IF col.align %] align="[% col.align %]"[% END %]
[%- IF col.valign %] valign="[% col.valign %]"[%- END %]
+ [%- IF col.colspan && col.colspan > 1 %] colspan="[% HTML.escape(col.colspan) %]"[% END -%]
[%- SET tdclass = '' %]
[%- IF row.BORDER_TOP %][%- SET tdclass = "$tdclass top_border" %][%- END %]
[%- IF row.BORDER_BOTTOM %][%- SET tdclass = "$tdclass bottom_border" %][%- END %]