Changeset 2093

Show
Ignore:
Timestamp:
04/25/08 01:59:05 (3 months ago)
Author:
bchoate
Message:

Trim whitespace on search term. BugId:79424

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-36/lib/MT/CMS/Search.pm

    r2081 r2093  
    293293      = map scalar $q->param($_), 
    294294      qw( search replace do_replace case is_regex is_limited _type is_junk is_dateranged replace_ids datefrom_year datefrom_month datefrom_day dateto_year dateto_month dateto_day from to show_all do_search orig_search quicksearch ); 
     295 
     296    # trim 'search' parameter 
     297    $search =~ s/(^\s+|\s+$)//g; 
     298    $app->param('search', $search); 
    295299 
    296300    if ( !$type || ( 'category' eq $type ) || ( 'folder' eq $type ) ) {