-
Notifications
You must be signed in to change notification settings - Fork 223
Remove ~/
handling from core Razor.
#427
Comments
I agree however razor is also striping non-path attributes data-attrib=" |
@grahamehorner right, this bug is exactly to stop processing |
Attributes that I've found with URL support based on the HTML5 spec:
Discussing a right approach for this. There's a lot more attribute element combos then initially thought 😄 |
Talked with @DamianEdwards and since this capability is entirely dependent on which version of HTML you're using (HTML5, HTML4 etc.) we've decided to move this behavior from the core Razor parser into an auto-added The |
Starting work on preliminary issues that will be required for this. In the end this issue will most likely be: remove |
@NTaylorMullen @DamianEdwards sounds great; happy to help out in reviewing and testing |
auto-added TagHelper; would this be a TagHelper that is registered with dependency injection and therefore a developer can override the default by registering the custom implementation? |
I believe anything with tag helpers can be overridden. It's part of the design of the feature 😄 |
@Eilon wasn't clear to me given the wording 'auto-added TagHelper' if this can be replaced by a custom TagHelper using config or dependency injection. |
I think what they mean is that it'll just be there by default in the project template. Not forced. |
@Eilon the idea is that it'd be auto-included in your views much like The thought behind the auto-adding approach is that not everyone will want to use |
Got it. |
- Removed parsing, chunk generation and code generation. - Removed related tests. - Did not modify existing unrelated tests with ~/ since it's just plain text and may be valid for end-users. #427
- Removed parsing, chunk generation and code generation. - Removed related tests. - Did not modify existing unrelated tests with ~/ since it's just plain text and may be valid for end-users. #427
~/
handling from core Razor.
Kind of related to #417
Allegedly Razor will resolve paths of all attributes of all HTML attributes, which means that
~
's will be stripped out regardless of whether the HTML (or Tag Helper) attribute represents a path or URL.We should consider adding some new TagHelper attribute such as
[UrlProperty]
to indicate that Razor should code-gen path resolution code for the property.The text was updated successfully, but these errors were encountered: