Razor: Link and Script tags, enableoptimizations strips out deferSee original GitHub issue
I’m submitting a [x] bug report about [x] Razor templating
Current behavior Trying to get a <script> on the page using Razor in a View…
<script defer src="//unpkg.com/@("@")github/clipboard-copy-element@latest" data-enableoptimizations="true"> </script>
But the result unexpectedly strips out
Seems like it should leave attributes in place that it doesn’t deal with, so I would expect to see this in the resulting HTML:
Instructions to Reproduce the Problem Add the first code example above to a View/Razor file. It will work, but View Source and the “defer” is gone.
Why change the behavior?
It seems like the behavior of
data-enableoptimizations should be to only deal with things it knows about and pass through anything unknown.
2sxc version(s): 12.2.1 Browser: all/any
- DNN: 9.09.01 Language: any/all
- Created 2 years ago
- Comments:6 (4 by maintainers)