Fixed issues with HTML escaping