Sanitize settings before document.write.