Prevent malformed cshtml by ensuring closing tags are always included