Add fix for unclosed HTML breaks

This changes the order of operations, truncating description before
replacing newlines with HTML breaks, to prevent the creation of unclosed
breaks which may otherwise cause rendering issues in Jellyfin.
This commit is contained in:
Patrick Hetz 2024-04-18 06:50:10 -04:00
parent c12340583e
commit 30715d5c26
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities
if (description.Length > maxLength)
{
description = description.Replace("\n", "<br>", System.StringComparison.CurrentCulture).Substring(0, maxLength);
description = description.Substring(0, maxLength);
description = description.Replace("\n", "<br>", System.StringComparison.CurrentCulture);
}
return description;