Mime search: Trim leading and trailing whitespace from input

Change-Id: I4f8142224d7585bff65ac3cbab4fce8b302c82bd
Merge "Mime search: Trim leading and trailing whitespace from input"