diff --git a/src/Orchard/UI/Resources/ResourceManager.cs b/src/Orchard/UI/Resources/ResourceManager.cs index 00407ce3e..c4a550dd1 100644 --- a/src/Orchard/UI/Resources/ResourceManager.cs +++ b/src/Orchard/UI/Resources/ResourceManager.cs @@ -24,6 +24,8 @@ namespace Orchard.UI.Resources { private List _footScripts; private IEnumerable _manifests; + private const string NotIE = "!IE"; + private static string ToAppRelativePath(string resourcePath) { if (!String.IsNullOrEmpty(resourcePath) && !Uri.IsWellFormedUriString(resourcePath, UriKind.Absolute)) { resourcePath = VirtualPathUtility.ToAppRelative(resourcePath); @@ -58,16 +60,30 @@ namespace Orchard.UI.Resources { public static void WriteResource(TextWriter writer, ResourceDefinition resource, string url, string condition, Dictionary attributes) { if (!string.IsNullOrEmpty(condition)) { - writer.WriteLine(""); + } } + var tagBuilder = GetTagBuilder(resource, url); + if (attributes != null) { // todo: try null value tagBuilder.MergeAttributes(attributes, true); } + writer.WriteLine(tagBuilder.ToString(resource.TagRenderMode)); + if (!string.IsNullOrEmpty(condition)) { - writer.WriteLine(""); + if (condition == NotIE) { + writer.WriteLine(""); + } + else { + writer.WriteLine(""); + } } }