sanitize the whitespace around flags