import rt 3.8.9
[freeside.git] / rt / html / Elements / CollectionAsTable / Row
index 64ecef4..bb90321 100644 (file)
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC 
 %#                                          <jesse@bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
 %# along with this program; if not, write to the Free Software
 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 %# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 %# 
 %# 
 %# CONTRIBUTION SUBMISSION POLICY:
@@ -55,6 +55,7 @@ $Warning => undef
 </%ARGS>
 
 <%PERL>
+use HTML::Entities;
 $m->out('<tr class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
 my $item;
 foreach my $column (@Format) {
@@ -71,7 +72,9 @@ foreach my $column (@Format) {
         next;
     }
     $item++;
-    $m->out('<td class="collection-as-table" ');
+    my $class = $column->{class}
+       ? encode_entities($column->{class}, q{'"&<>}) : 'collection-as-table';
+    $m->out(qq{<td class="$class" });
     $m->out( 'align="' . $column->{align} . '"' ) if ( $column->{align} );
     $m->out( 'style="' . $column->{style} . '"' ) if ( $column->{style} );
     $m->out('>');