Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

asp-append-version ignored when href/src URL contains a fragment but no query string #2862

Closed
dougbu opened this issue Jul 26, 2015 · 0 comments
Assignees
Milestone

Comments

@dougbu
Copy link
Member

dougbu commented Jul 26, 2015

The <img>, <link>, and <script> tag helpers support asp-append-version="true" when the provided URL contains a query string or a query string and a fragment. However all of these tag helpers ignore asp-append-version="true" if the URL contains a fragment but no query string.

E.g.

<script src="~/lib/bootstrap/dist/js/bootstrap.js#hash" asp-append-version="true"></script>

incorrectly generates

<script src="/lib/bootstrap/dist/js/bootstrap.js#hash"></script>

while

<script src="~/lib/hammer.js/hammer.js?a=b" asp-append-version="true"></script>

correctly generates

<script src="/lib/hammer.js/hammer.js?a=b&amp;v=hYWvJA6F6dmi9NgEPn9lZW5_K7m9hZvKjrIXCnHVhuQ"></script>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants