commit d10951d: [Fix] Treat soft hyphen as zero width space
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Dec 5 11:14:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-12-05 11:09:25 +0000
URL: https://github.com/rspamd/rspamd/commit/d10951d927a559bb983192c210b89bf2a42b6660 (HEAD -> master)
[Fix] Treat soft hyphen as zero width space
---
src/libutil/str_util.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 77bb96249..c08dd55bb 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -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) || \
More information about the Commits
mailing list