tweak removal of whitespace from barcodes
authorGalen Charlton <galen.charlton@liblime.com>
Mon, 11 May 2009 16:39:19 +0000 (11:39 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 11 May 2009 16:40:28 +0000 (11:40 -0500)
Per suggestion from Joe Atzberger, match on \s
instead of [ \t] for stripping leading and
trailing whitespace from barcode lookups.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
circ/circulation.pl

index 1c6fb61..982cc72 100755 (executable)
@@ -112,7 +112,7 @@ if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison t
 }
 
 my $barcode        = $query->param('barcode') || '';
-$barcode =~  s/^[ \t]+|[ \t]+$//g; # remove leading/trailing whitespace
+$barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
 
 $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
 my $stickyduedate  = $query->param('stickyduedate');