diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs
index 5a0eb161b2..5c2b6088e9 100644
--- a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs
@@ -336,7 +336,7 @@ namespace Microsoft.AspNet.Mvc.Razor
}
}
- if (tagHelperOutput.SelfClosing)
+ if (tagHelperOutput.TagMode == TagMode.SelfClosing)
{
writer.Write(" /");
}
@@ -344,7 +344,7 @@ namespace Microsoft.AspNet.Mvc.Razor
writer.Write('>');
}
- if (isTagNameNullOrWhitespace || !tagHelperOutput.SelfClosing)
+ if (isTagNameNullOrWhitespace || tagHelperOutput.TagMode == TagMode.StartTagAndEndTag)
{
WriteTo(writer, tagHelperOutput.PreContent);
if (tagHelperOutput.IsContentModified)
@@ -364,7 +364,7 @@ namespace Microsoft.AspNet.Mvc.Razor
WriteTo(writer, tagHelperOutput.PostContent);
}
- if (!isTagNameNullOrWhitespace && !tagHelperOutput.SelfClosing)
+ if (!isTagNameNullOrWhitespace && tagHelperOutput.TagMode == TagMode.StartTagAndEndTag)
{
writer.Write(string.Format(CultureInfo.InvariantCulture, "{0}>", tagHelperOutput.TagName));
}
diff --git a/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs b/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs
index b3dc9cd61b..400e6895ce 100644
--- a/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor/TagHelpers/UrlResolutionTagHelper.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Linq;
using System.Reflection;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
@@ -21,28 +20,28 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers
[TargetElement("*", Attributes = "itemid")]
[TargetElement("a", Attributes = "href")]
[TargetElement("applet", Attributes = "archive")]
- [TargetElement("area", Attributes = "href")]
+ [TargetElement("area", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("audio", Attributes = "src")]
- [TargetElement("base", Attributes = "href")]
+ [TargetElement("base", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("blockquote", Attributes = "cite")]
[TargetElement("button", Attributes = "formaction")]
[TargetElement("del", Attributes = "cite")]
- [TargetElement("embed", Attributes = "src")]
+ [TargetElement("embed", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("form", Attributes = "action")]
[TargetElement("html", Attributes = "manifest")]
[TargetElement("iframe", Attributes = "src")]
- [TargetElement("img", Attributes = "src")]
- [TargetElement("input", Attributes = "src")]
- [TargetElement("input", Attributes = "formaction")]
+ [TargetElement("img", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
+ [TargetElement("input", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
+ [TargetElement("input", Attributes = "formaction", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("ins", Attributes = "cite")]
- [TargetElement("link", Attributes = "href")]
+ [TargetElement("link", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("menuitem", Attributes = "icon")]
[TargetElement("object", Attributes = "archive")]
[TargetElement("object", Attributes = "data")]
[TargetElement("q", Attributes = "cite")]
[TargetElement("script", Attributes = "src")]
- [TargetElement("source", Attributes = "src")]
- [TargetElement("track", Attributes = "src")]
+ [TargetElement("source", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
+ [TargetElement("track", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("video", Attributes = "src")]
[TargetElement("video", Attributes = "poster")]
[EditorBrowsable(EditorBrowsableState.Never)]
diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/ImageTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/ImageTagHelper.cs
index 28680f0647..47d7e365a2 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/ImageTagHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/ImageTagHelper.cs
@@ -16,7 +16,10 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
///
+
-
+
-
-
+
-