diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-18 16:48:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-18 16:48:29 +0000 |
commit | afa975523e60d36be65d5b79d650a1c98e0a3b0d (patch) | |
tree | 10039476df23e99055864578ac69458088c82024 /src/libutil/str_util.h | |
parent | 3203d0f4422fdab18a03abf7fc713c562f15f70e (diff) | |
download | rspamd-afa975523e60d36be65d5b79d650a1c98e0a3b0d.tar.gz rspamd-afa975523e60d36be65d5b79d650a1c98e0a3b0d.zip |
[Minor] Core: Add lua utility to find some obscured unicode symbols
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r-- | src/libutil/str_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h index a2669d1a0..f95932547 100644 --- a/src/libutil/str_util.h +++ b/src/libutil/str_util.h @@ -455,5 +455,8 @@ gchar * rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen); gsize rspamd_gstring_strip (GString *s, const gchar *strip_chars); #define IS_ZERO_WIDTH_SPACE(uc) ((uc) == 0x200b || (uc) == 0x200c) +#define IS_OBSCURED_CHAR(uc) (((uc) >= 0x200B && (uc) <= 0x200F) || \ + ((uc) >= 0x2028 && (uc) <= 0x202F) || \ + ((uc) >= 0x205F && (uc) <= 0x206F)) #endif /* SRC_LIBUTIL_STR_UTIL_H_ */ |