Elements/RT__Ticket/ColumnMap

I’m sure there’s a significantly more stylish way of doing this. I
needed a quick fix because CSR’s here use in the subject
line and Search/Results.html wasn’t displaying it properly, even
though Ticket/Display.html does display it properly.

Could anyone suggest a more appropriate fix?

diff -u rt-3.3.10/html/Elements/RT__Ticket/ColumnMap

~rt3/local/html/Elements/RT__Ticket/ColumnMap
— rt-3.3.10/html/Elements/RT__Ticket/ColumnMap Sun Sep 19 20:59:45 2004
+++ /usr/local/rt3/local/html/Elements/RT__Ticket/ColumnMap Wed
Nov 10 13:25:52 2004
@@ -107,7 +107,14 @@
},
Subject => {
attribute => ‘Subject’,

  •    value => sub { return $_[0]->Subject || "(" . loc('No subject') . ")" }
    

+# value => sub { return $_[0]->Subject || “(” . loc(‘No
subject’) . “)” }

  •    value => sub { 
    
  •                   my $SubjectFix = $_[0]->Subject ? $_[0]->Subject : 
    
  •                       "(" . loc('No subject') . ")";
    
  •                   $SubjectFix =~ s/</&lt;/g;
    
  •                   $SubjectFix =~ s/>/&gt;/g;
    
  •                   return $SubjectFix;
    
  •                 }
    
    },
    ExtendedStatus => {
    title => ‘Status’,

Andy Harrison

Could anyone suggest a more appropriate fix?

Use either HTML::Mason::Escapes::basic_html_escape or
HTML::Entities::encode

I’d probably go with basic_html_escape, because HTML::Entities::encode
might be overzealous with unicode.

-R

I’m sure there’s a significantly more stylish way of doing this. I
needed a quick fix because CSR’s here use in the subject
line and Search/Results.html wasn’t displaying it properly, even
though Ticket/Display.html does display it properly.

Could anyone suggest a more appropriate fix?

Yes, we checked a proper fix into 3.3 a couple days ago. I’ll backport
it to 3.2 when I’m back home from Taiwan this weekend.

Jesse

I’m sure there’s a significantly more stylish way of doing this. I
needed a quick fix because CSR’s here use in the subject
line and Search/Results.html wasn’t displaying it properly, even
though Ticket/Display.html does display it properly.

Could anyone suggest a more appropriate fix?

Yes, we checked a proper fix into 3.3 a couple days ago. I’ll backport
it to 3.2 when I’m back home from Taiwan this weekend.

I tried grabbing the files

svn://svn.bestpractical.com/rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row
svn://svn.bestpractical.com/rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap

and putting them in my local tree. It works, but it displays several
instances of “\n” at the top of the screen while it is loading the
list.

Are there others I ought to grab? I was looking at svn logs, but it’s
the first time I’ve touched svn at all, so I’m probably missing
something.

Andy Harrison

I tried grabbing the files

svn://svn.bestpractical.com/rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row
svn://svn.bestpractical.com/rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap

and putting them in my local tree. It works, but it displays several
instances of “\n” at the top of the screen while it is loading the
list.

You don’t want to do that. Those files have other changes for 3.3. I’m
at LAX now. I’ll be “home” late tonight :wink: