diff --git a/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs b/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs index 400e6895ce..a413e2cfde 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs @@ -31,6 +31,7 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers [TargetElement("html", Attributes = "manifest")] [TargetElement("iframe", Attributes = "src")] [TargetElement("img", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)] + [TargetElement("img", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)] [TargetElement("input", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)] [TargetElement("input", Attributes = "formaction", TagStructure = TagStructure.WithoutEndTag)] [TargetElement("ins", Attributes = "cite")] @@ -41,6 +42,7 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers [TargetElement("q", Attributes = "cite")] [TargetElement("script", Attributes = "src")] [TargetElement("source", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)] + [TargetElement("source", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)] [TargetElement("track", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)] [TargetElement("video", Attributes = "src")] [TargetElement("video", Attributes = "poster")] @@ -65,7 +67,7 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers { "form", new[] { "action" } }, { "html", new[] { "manifest" } }, { "iframe", new[] { "src" } }, - { "img", new[] { "src" } }, + { "img", new[] { "src", "srcset" } }, { "input", new[] { "src", "formaction" } }, { "ins", new[] { "cite" } }, { "link", new[] { "href" } }, @@ -73,7 +75,7 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers { "object", new[] { "archive", "data" } }, { "q", new[] { "cite" } }, { "script", new[] { "src" } }, - { "source", new[] { "src" } }, + { "source", new[] { "src", "srcset" } }, { "track", new[] { "src" } }, { "video", new[] { "poster", "src" } }, }; diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/RazorWebSite.UrlResolution.Index.Encoded.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/RazorWebSite.UrlResolution.Index.Encoded.html index 0cf79e7fbe..8a89e575b2 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/RazorWebSite.UrlResolution.Index.Encoded.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/RazorWebSite.UrlResolution.Index.Encoded.html @@ -9,12 +9,12 @@