Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 247625d

Browse files
author
N. Taylor Mullen
committed
- Added the ability for the WriteTagHelperAsync in RazorPage.cs to understand minimized attributes.
1 parent 6ef8be9 commit 247625d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,13 @@ public async Task WriteTagHelperToAsync(
289289
{
290290
writer.Write(' ');
291291
writer.Write(attribute.Name);
292-
writer.Write("=\"");
293-
WriteTo(writer, HtmlEncoder, attribute.Value, escapeQuotes: true);
294-
writer.Write('"');
292+
293+
if (!attribute.Minimized)
294+
{
295+
writer.Write("=\"");
296+
WriteTo(writer, HtmlEncoder, attribute.Value, escapeQuotes: true);
297+
writer.Write('"');
298+
}
295299
}
296300

297301
if (tagHelperOutput.SelfClosing)

0 commit comments

Comments
 (0)