Skip to content
Permalink
Browse files
Strip whitespace from start/end of text
Fixes #11.
  • Loading branch information
Tim Brody committed Feb 14, 2013
1 parent 99c4eb8 commit 961e1591009b777ad65015d185cdd9d6eb2863ce
Showing with 3 additions and 0 deletions.
  1. +3 −0 perl_lib/EPrints/MetaField/Id.pm
@@ -49,6 +49,9 @@ sub sql_row_from_value

$value =~ s/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/\x{fffd}/g;

$value =~ s/^\s+//;
$value =~ s/\s+$//;

$value = substr( $value, 0, $self->{ "maxlength" } );

return( $value );

0 comments on commit 961e159

Please sign in to comment.