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
This will fail W3C validation. It also interferes with a sites content security policy causing nonce attributes added to the tag to be ignored (due to the duplicate src).
Haven't tested but I imagine the problem will be there with other tag helpers targeting script src attribute.
The text was updated successfully, but these errors were encountered:
I can confirm this but I also get a unhandled exception when trying this. It is to do with conflicts with the normal ScriptTagHelper. Smidge will need to adjust it's own to ignore all processing if other asp script tag helper attributes are applied.
I've pushed a fix for this. Now Smidge will validate if there are asp- attributes on script/link tags when trying to render a Smidge bundle and if there are it will throw an InvalidOperationException because these attributes from the Script/Link TagHelper will not work or be compatible with Smidge bundles.
If the script/link src/href is not a Smidge bundle, then it will just let the default Script/Link tag helpers execute as per normal. This was what was attempted to be done before but because the Smidge Script/Link tag helpers have their own src/href attributes, it would end up adding 2x to the output causing this issue.
If I use asp-append-version on a script tag in a project which includes Smidge 4.0.4 it results in markup with two
src
attributes, for example.Script reference:
<script src="~/main.js" asp-append-version="true"></script>
Markup (view source):
<script src="/main.js?v=xtltRP-8iJXgGK7LWJBGthatLEu0oYmDmTR3iRmR7ho" src="/main.js"></script>
This will fail W3C validation. It also interferes with a sites content security policy causing nonce attributes added to the tag to be ignored (due to the duplicate
src
).Haven't tested but I imagine the problem will be there with other tag helpers targeting script
src
attribute.The text was updated successfully, but these errors were encountered: