MT 3044 : Fix CSV Export when there are blank chars in tag names
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Fri, 5 Mar 2010 13:18:06 +0000 (14:18 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 16 Mar 2010 11:37:59 +0000 (12:37 +0100)
C4/Record.pm

index 704e1c4..ee04d3d 100644 (file)
@@ -485,6 +485,10 @@ sub marcrecord2csv {
     my @fieldstab;
     foreach (@marcfields) {
        my $marcfield = $_->{field};
+
+       # Remove any blank char that might have unintentionally insered into the tag name
+       $marcfield =~ s/\s+//;  
+
        # If it is a subfield
        if (index($marcfield, '$') > 0) {
            my ($fieldtag, $subfieldtag) = split('\$', $marcfield);