diff --git a/src/OrchardCore.Modules/OrchardCore.Liquid/Filters/ContentUrlFilter.cs b/src/OrchardCore.Modules/OrchardCore.Liquid/Filters/ContentUrlFilter.cs index 05e20d91002..84af20d6189 100644 --- a/src/OrchardCore.Modules/OrchardCore.Liquid/Filters/ContentUrlFilter.cs +++ b/src/OrchardCore.Modules/OrchardCore.Liquid/Filters/ContentUrlFilter.cs @@ -17,6 +17,9 @@ public ValueTask ProcessAsync(FluidValue input, FilterArguments argu { var urlHelper = _urlHelperFactory.GetUrlHelper(context.ViewContext); - return ValueTask.FromResult(new StringValue((urlHelper).Content(input.ToStringValue()))); + var trimmedInputString = input.ToStringValue().Trim(); + var absoluteUrl = urlHelper.Content(trimmedInputString); + + return ValueTask.FromResult(new StringValue(absoluteUrl)); } }