[Koha-patches] [PATCH] BZ5637 MT3044 : Fix CSV export when rer are blank characters

paul.poulain at biblibre.com paul.poulain at biblibre.com
Wed Jan 19 22:11:58 CET 2011


From: Paul Poulain <paul.poulain at biblibre.com>

---
 C4/Record.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/C4/Record.pm b/C4/Record.pm
index 497c03d..5606fb7 100644
--- a/C4/Record.pm
+++ b/C4/Record.pm
@@ -411,6 +411,8 @@ sub marcrecord2csv {
 	foreach (@marcfields) {
 
 	    my $field = $_->{field};
+        # Remove any blank char that might have unintentionally insered into the tag name
+        $field =~ s/\s+//g; 
 
 	    # If we have a user-supplied header, we use it
 	    if (exists $_->{header}) {
-- 
1.7.1



More information about the Koha-patches mailing list