Implement DOM-based HTML sanitizer