Remove trailing whitespace from the location parameter when searching