trim the location string