-
Notifications
You must be signed in to change notification settings - Fork 224
Track TagHelperAttribute quotes #705
Comments
Is preserving the non-quotes actually important? Also, what happens if a Tag Helper modifies that attribute? Does it "gain" the quotes after it's modified? E.g. let's say in my Tag Helper I set |
Actually, with the new immutability of A user would have to purposefully shoot themselves in the foot and do something like: var myBadAttribute = new TagHelperAttribute("type", "this has spaces", QuoteType.Unquoted);
output.Attributes.SetAttribute(myBadAttribute); |
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tess.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeStructure`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeStructure` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tests.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeStructure`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeStructure` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tests.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeStructure`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeStructure` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tests.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeStructure`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeStructure` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tests.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags. - Removed `TagHelperOutputExtensions`. It's no longer needed. - We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes. - Updated tests.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`. - Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now. - Stopped manually escaping double quotes because we now know how an attribute was originally written. - Updated tests to account for new attribute format (from kvp). #705
This would enable
TagHelper
users to write things like<input type=checkbox />
and have it output the identical code; whereas today we output<input type="checkbox" />
.This change would actually have a significant perf impact as well. Today in
TagHelperOutput
we have to write an attribute to an intermediate writer to potentially escape any double quotes in the case that a user wrote<input type=' """" ' />
since we always output with double quotes.This intermediate writing step in my tests have represented over 5% of allocations.
The text was updated successfully, but these errors were encountered: