ASP.net MVC6 标签助手生成无效标记?

ASP.net MVC6 Tag Helpers generating invalid markup?

考虑以下因素:

<link asp-fallback-href="~/vendor/lightbox2/css/lightbox.min.css"
      asp-fallback-test-class="lightbox"
      asp-fallback-test-property="position"
      asp-fallback-test-value="absolute"
      href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/css/lightbox.min.css"
      rel="stylesheet" />

以下元标记由 asp 生成:

<meta name="x-stylesheet-fallback-test" class="lightbox" />

如果我尝试使用 HTML5 验证器验证它,我会收到以下错误:

Validator.nu (Public):元素“meta”缺少以下一个或多个属性:“content”、“属性”。

我是否可以解决这个问题,或者我应该向 asp 团队报告这个问题?

更新

我已将其作为 issue 提交给 asp.net 团队。

根据the issue that details the requirements:

,这似乎是设计使然

The failure is determined by way of injecting a dummy <meta> tag with a specified class name (asp-fallback-test-class attribute) and then testing the computed style of that element to see if a specified CSS property (asp-fallback-test-property attribute) is equal to a specified value (asp-fallback-test-value).

The HTML 5.1 spec (警告:大文档) 有以下要说的:

Exactly one of the name, http-equiv, charset, and itemprop attributes must be specified.

If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified. Otherwise, it must be omitted.

所以这似乎是一个错误。您可能已经在提交的错误报告中注意到,RC2 的问题 has been fixed