mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 10:07:55 +08:00
Framework/Resources: Fixing a regression with Style.Include, so it supports paths with a query string again, fixes #8231
This commit is contained in:
@@ -307,7 +307,7 @@ namespace Orchard.UI.Resources {
|
||||
private string GetPhysicalPath(string url) {
|
||||
if (!String.IsNullOrEmpty(url) && !Uri.IsWellFormedUriString(url, UriKind.Absolute) && !url.StartsWith("//")) {
|
||||
if (VirtualPathUtility.IsAbsolute(url) || VirtualPathUtility.IsAppRelative(url)) {
|
||||
return HostingEnvironment.MapPath(url);
|
||||
return HostingEnvironment.MapPath(url.Split(new[] { '?' })[0]);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(BasePath)) {
|
||||
return HostingEnvironment.MapPath(VirtualPathUtility.Combine(BasePath, url));
|
||||
|
@@ -53,7 +53,7 @@ namespace Orchard.UI.Resources {
|
||||
|
||||
private static string ToPhysicalPath(string resourcePath) {
|
||||
if (!String.IsNullOrEmpty(resourcePath) && (VirtualPathUtility.IsAppRelative(resourcePath) || VirtualPathUtility.IsAbsolute(resourcePath)) && !Uri.IsWellFormedUriString(resourcePath, UriKind.Absolute) && !resourcePath.StartsWith("//")) {
|
||||
return HostingEnvironment.MapPath(resourcePath);
|
||||
return HostingEnvironment.MapPath(resourcePath.Split(new[] { '?' })[0]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user