diff --git a/src/Our.Umbraco.FullTextSearch/Rendering/HttpPageRenderer.cs b/src/Our.Umbraco.FullTextSearch/Rendering/HttpPageRenderer.cs index 3184a3f..2835f8a 100644 --- a/src/Our.Umbraco.FullTextSearch/Rendering/HttpPageRenderer.cs +++ b/src/Our.Umbraco.FullTextSearch/Rendering/HttpPageRenderer.cs @@ -34,6 +34,12 @@ public virtual async Task Render(IPublishedContent publishedContent, Pub { var publishedPageUrl = publishedContent.Url(mode: UrlMode.Absolute); + if (!Uri.TryCreate(publishedPageUrl, UriKind.Absolute, out var url)) + { + _logger.LogInformation("Unable to render page {NodeId}, url returned is invalid ({Url})", publishedContent.Id, publishedPageUrl); + return string.Empty; + } + try { // Using a named client to allow for configuration of default headers, cookies and more during service registration