Trim whitespaces at start of search string, prevent server crash