[Rt-devel] the /CLASS modifier in ParseFormat

Ruslan Zakirov ruz at bestpractical.com
Mon Aug 20 16:18:47 EDT 2007


as well it may be better to join classes instead of replacing.

On 8/20/07, Jesse Vincent <jesse at bestpractical.com> wrote:
>
> On Aug 20, 2007, at 11:55 AM, Nicholas Clark wrote:
>
> > In Elements/CollectionAsTable/ParseFormat, along with the code for /
> > TITLE,
> > /STYLE and /ALIGN, there is code to parse /CLASS and store the value.
> > But nothing ever reads it
> >
> > Would the appended patch make sense? (Against 3.6.4)
> > With this I can tweak the format to set classes, which allows CSS to
> > reference particular <td>s
> >
>
> Before you commit this, can you make sure that $class gets properly
> escaped? so that users cant' inject javascript and the like?
>
> > Nicholas Clark
> >
> > Index: html/Elements/CollectionAsTable/Row
> > ===================================================================
> > RCS file: /export/cvsroot/rt-external/html/Elements/
> > CollectionAsTable/Row,v
> > retrieving revision 1.1.1.2
> > diff -p -u -r1.1.1.2 Row
> > --- html/Elements/CollectionAsTable/Row       1 Aug 2007 15:56:53 -0000
> > 1.1.1.2
> > +++ html/Elements/CollectionAsTable/Row       20 Aug 2007 11:02:13 -0000
> > @@ -71,7 +71,8 @@ foreach my $column (@Format) {
> >          next;
> >      }
> >      $item++;
> > -    $m->out('<td class="collection-as-table" ');
> > +    my $class = $column->{class} || '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('>');
> > _______________________________________________
> > List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/
> > rt-devel
> >
>
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
>


-- 
Best regards, Ruslan.


More information about the Rt-devel mailing list