]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Core: Also count spaces when skipping invisible spaces
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Jan 2019 14:54:40 +0000 (14:54 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Jan 2019 14:54:40 +0000 (14:54 +0000)
src/libmime/message.c

index 4cb9e07b35d3e6faa69910fe23926c9747580419..f75916465c37607fb5dd10e6ec5244cba5a16a43 100644 (file)
@@ -241,6 +241,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
                                        if (uc == 0x200b) {
                                                /* Invisible space ! */
                                                task->flags |= RSPAMD_TASK_FLAG_BAD_UNICODE;
+                                               part->spaces ++;
 
                                                if (p > c) {
                                                        g_byte_array_append (part->utf_stripped_content,
@@ -255,6 +256,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
                                                        break;
                                                }
 
+                                               part->double_spaces ++;
                                                p = begin + off;
                                                c = p;
                                        }