- #5317
- previously worked only because `TagBuilder` cannot be empty and `HtmlString` overrides `ToString()`
- `TagBuilder.ToString()` (now the type's `FullName`) is also never empty
- copy `NullHtmlEncoder` from Razor and give it a better name (`PassThroughHtmlEncoder`)
- not available in this project and (from its namespace) not intended for general use
- #5313
Also:
- preserve existing `TagHelperAttribute.ValueStyle`
- fix this in `UrlResolutionTagHelper`, `LinkTagHelper`, and `ScriptTagHelper` as well
- correct handling of non-`string` `classAttribute.Value`s in `TagHelperOutputExtensions`
- relates to #3918 because new `ClassAttributeHtmlContent` is smaller than any concatenated attribute value
nit: clean up `CacheTagHelper` whitespace and `using`s
- #5028
- helpers similar to our HTML or tag helpers can use the new singleton to examine or add validation attributes
- in the most common case, helpers add validation attributes to a `TagBuilder`
- separate `DefaultValidationHtmlAttributeProvider` from `DefaultHtmlGenerator`
- avoids creating two instances of the `DefaultHtmlGenerator` singleton
- would be even uglier to require callers to cast an `IHtmlGenerator` to `ValidationHtmlAttributeProvider`
- `[Obsolete]` old `DefaultHtmlGenerator` constructor
- #5209
- update affected `HtmlHelperValiationSummaryTest` and functional tests
- add `ValidationSummaryTagHelperTest` tests to cover related scenarios
##### Behaviour changes when no errors exist for the model:
###### Tag helper
``` html
<div asp-validation-summary="ModelOnly" class="order"><h3>Oopsie<h3></div>
```
previously generated
``` html
<div class="order validation-summary-errors"><h3>Oopsie</h3><ul><li style="display:none"></li>
</ul></div>
```
and now generates
``` html
<div class="order"><h3>Oopsie</h3></div>
```
###### HTML helper
``` c#
@Html.ValidationSummary(excludePropertyErrors: true, message: "Oopsie")
```
previously generated
``` html
<div class=\"validation-summary-errors\"><span>Oopsie</span>
<ul><li style=\"display:none\"></li>
</ul></div>
```
and now generates nothing (`@HtmlString.Empty`).
This addresses #1051. There is one more pull request that needs to be completed/merged (for `CompositeTagHelperDescriptorResolver` and friends). After that, runtime should work!
This addresses #1051. There is one more pull request that needs to be completed/merged (for `CompositeTagHelperDescriptorResolver` and friends). After that, runtime should work!
- aspnet/Universe#349
- minimize `dotnet` setup time; no need for caching
- `KOREBUILD_TEST_DNXCORE` env variable isn't used anymore
- no need for icu4c w/ current `dotnet` builds
- #4988
- preserve whitespace as the setting demands
- correct previous `string.IsNullOrEmpty()` call to match previous `ValueProviderResultExtensions.ConvertTo()` use
- short-circuit other `string`-to-`string` conversions (as `ValueProviderResultExtensions.ConvertTo()` does)
- correct documentation of `ConvertEmptyStringToNull` properties
- add more tests of these scenarios and remove duplicate `BindModel_ValidValueProviderResult_ConvertEmptyStringsToNull()` test
- consolidate `ButtonTagHelper` and `SubmitTagHelper` into `FormActionTagHelper`
- consolidate `ButtonTagHelperTest` and `SubmitTagHelperTest` into `FormActionTagHelperTest`
nits:
- do not allocate dictionaries in the `<a>` or `<form>` tag helpers unless needed
- clean up some hard-to-maintain whitespace