MT 3044 : Fix CSV Export when there are blank chars in tag names
[koha.git] / 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);