Skip to content

Commit

Permalink
Trim Liquid content urls (OrchardCMS#17322)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytes1027 authored Jan 9, 2025
1 parent 8618599 commit f4a09f9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public ValueTask<FluidValue> ProcessAsync(FluidValue input, FilterArguments argu
{
var urlHelper = _urlHelperFactory.GetUrlHelper(context.ViewContext);

return ValueTask.FromResult<FluidValue>(new StringValue((urlHelper).Content(input.ToStringValue())));
var trimmedInputString = input.ToStringValue().Trim();
var absoluteUrl = urlHelper.Content(trimmedInputString);

return ValueTask.FromResult<FluidValue>(new StringValue(absoluteUrl));
}
}

0 comments on commit f4a09f9

Please sign in to comment.