Fixed: Escape backticks in discord notifications

(cherry picked from commit 70c74fc1769f2094a14faaa103c49d744534be9f)
This commit is contained in:
Mark McDowall 2025-04-29 18:55:34 -07:00 committed by Bogdan
parent 96f956a5d6
commit ed777de015

View file

@ -514,9 +514,9 @@ namespace NzbDrone.Core.Notifications.Discord
{
var albumTitles = string.Join(" + ", albums.Select(e => e.Title));
var title = $"{artist.Name} - {albumTitles}";
var title = $"{artist.Name} - {albumTitles}".Replace("`", "\\`");
return title.Length > 256 ? $"{title.AsSpan(0, 253)}..." : title;
return title.Length > 256 ? $"{title.AsSpan(0, 253).TrimEnd('\\')}..." : title;
}
}
}