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

Link tag helper does not expand comma-separated list #2841

Closed
natemcmaster opened this issue Jul 22, 2015 · 1 comment
Closed

Link tag helper does not expand comma-separated list #2841

natemcmaster opened this issue Jul 22, 2015 · 1 comment
Assignees
Milestone

Comments

@natemcmaster
Copy link
Contributor

https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.TagHelpers/LinkTagHelper.cs#L118 says "asp-href-include" can include a comma-separated list of files and globs. Only the first file/pattern included is actually produced.

Setup:

<link asp-href-include="~/test1.css,~/test2.css" rel="stylesheet" />

Expected:

<link href="/test1.css" rel="stylesheet" />
<link href="/test2.css" rel="stylesheet" />

Actual:

<link href="/test1.css" rel="stylesheet" />

Repro:
https://github.com/natemcmaster/mvc-issue-2841

@danroth27 danroth27 added this to the 6.0.0-beta7 milestone Jul 22, 2015
@ajaybhargavb
Copy link
Contributor

@natemcmaster, Looks like the ~ is not being handled properly in comma separated inputs. Your example should work if you remove ~ from the second url.

<link asp-href-include="~/test1.css,/test2.css" rel="stylesheet" />

I am working on fixing this.

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

3 participants