From b43176764b34eab397c5882281f60054f286bfd7 Mon Sep 17 00:00:00 2001 From: Aleh Khantsevich Date: Thu, 6 Mar 2025 22:34:05 +0100 Subject: [PATCH] Trim all whitespaces, including \t for unsubscribe links (#599) --- Wino.Services/MimeFileService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wino.Services/MimeFileService.cs b/Wino.Services/MimeFileService.cs index 29839350..1d33d95f 100644 --- a/Wino.Services/MimeFileService.cs +++ b/Wino.Services/MimeFileService.cs @@ -161,8 +161,8 @@ public class MimeFileService : IMimeFileService { var unsubscribeLinks = message.Headers[HeaderId.ListUnsubscribe] .Normalize() - .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) - .Select(x => x.Trim([' ', '<', '>'])); + .Split([','], StringSplitOptions.RemoveEmptyEntries) + .Select(x => x.Trim().Trim(['<', '>'])); // Only two types of unsubscribe links are possible. // So each has it's own property to simplify the usage.