Skip to content

Commit 56601a8

Browse files
committed
MMI-3370 Fix HTML decoded text (#2551)
1 parent 53ac6a9 commit 56601a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

services/net/content/ContentManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ private void UpdateEtagLocalCache(string keyName, string? etag)
418418
private async Task<API.Areas.Services.Models.Ingest.SourceModel?> GetSourceAsync(string code)
419419
{
420420
return (await GetLocalCacheListAsync<IEnumerable<API.Areas.Services.Models.Ingest.SourceModel>>(SourceCodeListCacheKey))?
421-
.Where(x => x.Code.ToUpperInvariant() == code.ToUpperInvariant()).FirstOrDefault();
421+
.Where(x => x.Code.Equals(code, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
422422
}
423423

424424
/// <summary>
@@ -563,8 +563,8 @@ private async Task ProcessSourceContentAsync(ConsumeResult<string, SourceContent
563563
content.OwnerId = model.RequestedById ?? source?.OwnerId;
564564
content.Headline = model.Title;
565565
content.Page = model.Page[0..Math.Min(model.Page.Length, 10)]; // TODO: Temporary workaround to deal FileMonitor Service.
566-
content.Summary = String.IsNullOrWhiteSpace(summary) ? "" : summary;
567-
content.Body = !String.IsNullOrWhiteSpace(body) ? body : model.ContentType == ContentType.AudioVideo ? "" : summary;
566+
content.Summary = System.Net.WebUtility.HtmlDecode(String.IsNullOrWhiteSpace(summary) ? "" : summary);
567+
content.Body = System.Net.WebUtility.HtmlDecode(!String.IsNullOrWhiteSpace(body) ? body : model.ContentType == ContentType.AudioVideo ? "" : summary);
568568
content.IsApproved = model.ContentType == ContentType.AudioVideo && model.PublishedOn.HasValue && model.Status == ContentStatus.Publish && !String.IsNullOrWhiteSpace(model.Body);
569569
content.SourceUrl = model.Link.Length > 1000 ? model.Link[..1000] : model.Link;
570570
content.PublishedOn = model.PublishedOn;

0 commit comments

Comments
 (0)