Allow full HTML control for email template

These changes should help to fix #795 by reducing the level of sanitation applied to email templates.