Strip messages to avoid adding whitespace.