Clean up HTML snippets