Added client-side HTML sanitization

Added a generic method (html_sanitize) and integrated it with modal forms.