Custom tag helper automatically removes attributes from markup Consider a custom tag helper with this: