Escape legend HTML (duplication in resequencing).