diff --git a/src/OrchardCore.Modules/OrchardCore.Resources/Liquid/ScriptTag.cs b/src/OrchardCore.Modules/OrchardCore.Resources/Liquid/ScriptTag.cs index 492dd40895d..4512566b8c2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Resources/Liquid/ScriptTag.cs +++ b/src/OrchardCore.Modules/OrchardCore.Resources/Liquid/ScriptTag.cs @@ -152,6 +152,14 @@ public static async ValueTask WriteToAsync(List argu var setting = resourceManager.RegisterResource("script", name); + if (customAttributes != null) + { + foreach (var attribute in customAttributes) + { + setting.SetAttribute(attribute.Key, attribute.Value); + } + } + if (at != ResourceLocation.Unspecified) { setting.AtLocation(at);