trim leading & trailing whitespace from service searches
[freeside.git] / httemplate / search / cust_svc.html
index 1ab5ed1..127e7ab 100644 (file)
@@ -39,6 +39,7 @@ my $orderby = 'ORDER BY svcnum'; #has to be ordered by something
 if ( length( $cgi->param('search_svc') ) ) {
 
   my $string = $cgi->param('search_svc');
+  $string =~ s/(^\s+|\s+$)//; #trim leading & trailing whitespace
 
   # implement fuzzy searching in subclasses too at some point?
   # service searching maybe shouldn't be fuzzy...