From b12f60e443014c6bcd7d849f35099680543b7448 Mon Sep 17 00:00:00 2001 From: Steve Temple Date: Thu, 27 Jun 2013 00:04:37 +0100 Subject: [PATCH] Allow for absolute URLs as well as virtual in ResolveUrl to allow for FileSystemProviders that use CDNs --- src/Umbraco.Core/IO/IOHelper.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index bc860705a2..22dc0814d5 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -45,6 +45,8 @@ namespace Umbraco.Core.IO { if (virtualPath.StartsWith("~")) return virtualPath.Replace("~", SystemDirectories.Root).Replace("//", "/"); + else if (Uri.IsWellFormedUriString(virtualPath, UriKind.Absolute)) + return virtualPath; else return VirtualPathUtility.ToAbsolute(virtualPath, SystemDirectories.Root); }