mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 19:34:40 +08:00
Fixing that stylesheets having a protocol-relative URL caused exception when building shape alternate names
This commit is contained in:
@@ -43,6 +43,9 @@ namespace Orchard.DisplayManagement.Descriptors.ResourceBindingStrategy {
|
||||
if (Uri.IsWellFormedUriString(fileName, UriKind.Absolute)
|
||||
|| (fileName.StartsWith("//", StringComparison.InvariantCulture)
|
||||
&& Uri.IsWellFormedUriString("http:" + fileName, UriKind.Absolute))) {
|
||||
if (fileName.StartsWith("//", StringComparison.InvariantCulture)) {
|
||||
fileName = "http:" + fileName;
|
||||
}
|
||||
var uri = new Uri(fileName);
|
||||
shapeName = uri.Authority + "$" + uri.AbsolutePath + "$" + uri.Query;
|
||||
}
|
||||
|
Reference in New Issue
Block a user