diff --git a/src/Orchard/UI/Resources/ResourceDefinition.cs b/src/Orchard/UI/Resources/ResourceDefinition.cs index ff3532781..466987527 100644 --- a/src/Orchard/UI/Resources/ResourceDefinition.cs +++ b/src/Orchard/UI/Resources/ResourceDefinition.cs @@ -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)); diff --git a/src/Orchard/UI/Resources/ResourceManager.cs b/src/Orchard/UI/Resources/ResourceManager.cs index 12d2501e0..e5360e658 100644 --- a/src/Orchard/UI/Resources/ResourceManager.cs +++ b/src/Orchard/UI/Resources/ResourceManager.cs @@ -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; }