Improved HTML sanitization; modified HashMap iteration