[Rt-commit] rt branch, 4.2/refactor-tsv, updated. rt-4.2.3-9-g83143dd

Alex Vandiver alexmv at bestpractical.com
Fri Apr 18 15:03:41 EDT 2014


The branch, 4.2/refactor-tsv has been updated
       via  83143dd10ebfc716a77bd2120ca4c37a158184a8 (commit)
      from  a8232c753748f770c0ce9d25f468566c4dabc817 (commit)

Summary of changes:
 share/html/Elements/TSVExport | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 83143dd10ebfc716a77bd2120ca4c37a158184a8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Apr 18 15:03:26 2014 -0400

    Prevent run-ons in fields with newlines
    
    Replace newlines with spaces, to prevent content wrapped across lines
    from running together when exported as TSV.

diff --git a/share/html/Elements/TSVExport b/share/html/Elements/TSVExport
index eff696f..2c6fa11 100644
--- a/share/html/Elements/TSVExport
+++ b/share/html/Elements/TSVExport
@@ -113,7 +113,7 @@ while (my $row = $Collection->Next) {
             $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 =~ s/(?:\n|\r)+/ /g; $val =~ s{\t}{    }g;
             $val = $no_html->scrub($val);
             $val = HTML::Entities::decode_entities($val);
             Encode::encode_utf8($val);

-----------------------------------------------------------------------


More information about the rt-commit mailing list