aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-03 23:16:33 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-03 23:16:33 +0100
commite5328bd63e30aba25e20fb94a21927a5eef61e50 (patch)
tree672adaec19d4c59a9be467283f7f16854b4cccda /src/libutil
parent572e0b07c3cc9285b7e634d0d56172772e415efe (diff)
downloadrspamd-e5328bd63e30aba25e20fb94a21927a5eef61e50.tar.gz
rspamd-e5328bd63e30aba25e20fb94a21927a5eef61e50.zip
[Fix] Fix emoji joiner FP
Issue: #4290
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/cxx/utf8_util.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/cxx/utf8_util.cxx b/src/libutil/cxx/utf8_util.cxx
index 8c727e9ad..0e7cd39d7 100644
--- a/src/libutil/cxx/utf8_util.cxx
+++ b/src/libutil/cxx/utf8_util.cxx
@@ -85,8 +85,10 @@ rspamd_normalise_unicode_inplace(char *start, size_t *len)
if (!zw_spaces.isFrozen()) {
/* Add zw spaces to the set */
zw_spaces.add(0x200B);
+ /* TODO: ZW non joiner, it might be used for ligatures, so it should possibly be excluded as well */
zw_spaces.add(0x200C);
- zw_spaces.add(0x200D);
+ /* See github issue #4290 for explanation. It seems that the ZWJ has many legit use cases */
+ //zw_spaces.add(0x200D);
zw_spaces.add(0xFEF);
zw_spaces.add(0x00AD);
zw_spaces.freeze();