From 0b6efdbc57b0573d2642e96cd653cb0efe82ccfa Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Wed, 19 May 2021 13:32:34 -0400 Subject: [PATCH] fix #1359 - Image bug in src attribute - image is not displayed - caused by multi-tenancy refactoring --- Oqtane.Client/Modules/HtmlText/Edit.razor | 4 ++-- Oqtane.Client/Modules/HtmlText/Index.razor | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/Modules/HtmlText/Edit.razor b/Oqtane.Client/Modules/HtmlText/Edit.razor index 269bb022..6517d56f 100644 --- a/Oqtane.Client/Modules/HtmlText/Edit.razor +++ b/Oqtane.Client/Modules/HtmlText/Edit.razor @@ -51,7 +51,7 @@ if (htmltext != null) { _content = htmltext.Content; - _content = _content.Replace(Constants.ContentUrl, "/" + PageState.Alias.Path + Constants.ContentUrl); + _content = _content.Replace(Constants.ContentUrl, Utilities.TenantUrl(PageState.Alias, Constants.ContentUrl)); _createdby = htmltext.CreatedBy; _createdon = htmltext.CreatedOn; _modifiedby = htmltext.ModifiedBy; @@ -72,7 +72,7 @@ private async Task SaveContent() { string content = await RichTextEditorHtml.GetHtml(); - content = content.Replace("/" + PageState.Alias.Path + Constants.ContentUrl, Constants.ContentUrl); + content = content.Replace(Utilities.TenantUrl(PageState.Alias, Constants.ContentUrl), Constants.ContentUrl); try { diff --git a/Oqtane.Client/Modules/HtmlText/Index.razor b/Oqtane.Client/Modules/HtmlText/Index.razor index 57094850..17deeade 100644 --- a/Oqtane.Client/Modules/HtmlText/Index.razor +++ b/Oqtane.Client/Modules/HtmlText/Index.razor @@ -26,7 +26,7 @@ if (htmltext != null) { content = htmltext.Content; - content = content.Replace(Constants.ContentUrl, "/" + PageState.Alias.Path + Constants.ContentUrl); + content = content.Replace(Constants.ContentUrl, Utilities.TenantUrl(PageState.Alias, Constants.ContentUrl)); } } catch (Exception ex)