[Rt-devel] Elements/RT__Ticket/ColumnMap

Andy Harrison aharrison at gmail.com
Wed Nov 10 13:41:02 EST 2004


I'm sure there's a significantly more stylish way of doing this.  I
needed a quick fix because CSR's here use <username> 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


More information about the Rt-devel mailing list