Trim leading and trailing whitespace from metabib.full_rec values - fixes ISSN quicks...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Nov 2010 22:43:31 +0000 (22:43 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Nov 2010 22:43:31 +0000 (22:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@18752 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm

index cf13bee..98ff353 100644 (file)
@@ -1096,6 +1096,11 @@ sub _data_tag_to_full_rows {
         # Split date ranges and ISSNs on the hyphen
         $val =~ s/(\d{4})-(\d{3,4}x?)/ $1 $2 /goi;
         $val =~ s/(\w+)\/(\w+)/$1 $2/sgo;
+
+        # Remove leading and trailing space
+        $val =~ s/^\s*//;
+        $val =~ s/\s*$//;
+
         $ns->value( lc($val) );
 
         push @$ns_list, $ns;