Trim whitespace in tag search [#1]

after splitting on spaces, a trailing space would result in a null value
in the query params, and thus find all images.