Trim all whitespaces, including \t for unsubscribe links (#599)

This commit is contained in:
Aleh Khantsevich
2025-03-06 22:34:05 +01:00
committed by GitHub
parent 77f24282e0
commit b43176764b

View File

@@ -161,8 +161,8 @@ public class MimeFileService : IMimeFileService
{ {
var unsubscribeLinks = message.Headers[HeaderId.ListUnsubscribe] var unsubscribeLinks = message.Headers[HeaderId.ListUnsubscribe]
.Normalize() .Normalize()
.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Split([','], StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.Trim([' ', '<', '>'])); .Select(x => x.Trim().Trim(['<', '>']));
// Only two types of unsubscribe links are possible. // Only two types of unsubscribe links are possible.
// So each has it's own property to simplify the usage. // So each has it's own property to simplify the usage.