Close any remaining tags when filtering HTML