remove unnecessary newlines from whitelist