You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Today Razor special cases ~/ at the beginning of attributes and treats them as "resolve an application relative URL"; however, it does this for every attribute which is overkill/incorrect. After investigating the attributes that have URL capability in Razor the list warrants something less hard coded into the core of Razor to resolve application relative URLs.
The list of HTML5 url based attributes I was able to find are:
The TagHelper should exist in Microsoft.AspNet.Mvc.Razor and should be auto-added to Razor pages (much like how we auto add @inject directives). It should inspect TagHelperOutput.Attributes and TagHelperOutput.TagName for the various combinations listed above and resolve URLs if they begin with ~/. Lastly, it should have an [EditorBrowsable(EditorBrowsableState.Never)] attribute to prevent excess highlighting in the Razor editor (will work once aspnet/Razor#447 is completed).