Trim whitespace around selectors