Trim whitespace from certain site settings

Fixes #1907