Skip to content

Commit

Permalink
bootstrap-icons.svg is missing base path
Browse files Browse the repository at this point in the history
(cherry picked from commit 099f933)
  • Loading branch information
muratcakir authored and markwoerdenweber committed Dec 9, 2024
1 parent 7581417 commit b2e6f9f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,12 @@ internal static IHtmlContent BootstrapIconInternal(this IHtmlHelper helper,
}

var httpContext = helper.ViewContext.HttpContext;
var urlHelper = httpContext.RequestServices.GetService<IUrlHelper>();
var fileVersionProvider = httpContext.RequestServices.GetRequiredService<IFileVersionProvider>();

// Use tag (with file version appended)
var fileVersionProvider = httpContext.RequestServices.GetRequiredService<IFileVersionProvider>();
var href = fileVersionProvider.AddFileVersionToPath(httpContext.Request.PathBase, $"/lib/bi/bootstrap-icons.svg") + "#" + name;
var filePath = urlHelper.Content("~/lib/bi/bootstrap-icons.svg");
var href = fileVersionProvider.AddFileVersionToPath(httpContext.Request.PathBase, filePath) + "#" + name;
var symbol = new TagBuilder("use");
symbol.Attributes["xlink:href"] = href;

Expand Down

0 comments on commit b2e6f9f

Please sign in to comment.