]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Treat soft hyphen as zero width space
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Dec 2019 11:09:25 +0000 (11:09 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Dec 2019 11:09:25 +0000 (11:09 +0000)
src/libutil/str_util.h

index 77bb9624979be28c3f195353a1ccec9a7bd62f51..c08dd55bbd908759ca564ce5f2405092b7effdb0 100644 (file)
@@ -561,7 +561,8 @@ gchar ** rspamd_string_len_split (const gchar *in, gsize len,
 #define IS_ZERO_WIDTH_SPACE(uc) ((uc) == 0x200B || \
                                 (uc) == 0x200C || \
                                 (uc) == 0x200D || \
-                                (uc) == 0xFEFF)
+                                (uc) == 0xFEFF || \
+                                                               (uc) == 0x00AD)
 #define IS_OBSCURED_CHAR(uc) (((uc) >= 0x200B && (uc) <= 0x200F) || \
                                 ((uc) >= 0x2028 && (uc) <= 0x202F) || \
                                 ((uc) >= 0x205F && (uc) <= 0x206F) || \