Allow tabs and multilines
[manu/RT-Extension-SearchResults-XLS.git] / html / Search / Results.xls
index 8074692..b1eb15d 100644 (file)
@@ -82,7 +82,7 @@ my $col_entry = sub {
     delete $col->{title}
         if $col->{title} and $col->{title} =~ /^\s*#\s*$/;
     return {
-        header => Encode::encode_utf8(loc($col->{title} || $col->{attribute})),
+        header => loc($col->{title} || $col->{attribute}),
         map    => $m->comp(
             "/Elements/ColumnMap",
             Name  => $col->{attribute},
@@ -142,12 +142,9 @@ while (my $row = $Tickets->Next) {
         for (@$col) {
             my $val = ProcessColumnMapValue($_->{map}, Arguments => [$row, $ii++], Escape => 0);
             $val = loc($val) if $_->{should_loc};
-            # remove tabs from all field values, they screw up the tsv
             $val = '' unless defined $val;
-            $val =~ s/(?:\n|\r)//g; $val =~ s{\t}{    }g;
             $val = $no_html->scrub($val);
             $val = HTML::Entities::decode_entities($val);
-            Encode::encode_utf8($val);
             $worksheet->write_string($ws_row, $ws_col, $val);
             $ws_col++;
         }