From 652f88fa9c6db6c8185bedaf527364c719e5fe72 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 24 Nov 2021 15:28:53 +0100 Subject: settings/manage: sanitize various Unicode zero-width spaces to nothing --- alot/settings/manager.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/alot/settings/manager.py b/alot/settings/manager.py index e4fa48d7..5d2098b0 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -637,6 +637,20 @@ class SettingsManager: # expand tabs table[ord('\t')] = ' ' * tab_width + # various Unicode zero-width spaces + # mongolian vowel separator + table[0x180e] = None + # zero width space + table[0x200b] = None + # zero width non-joiner + table[0x200c] = None + # zero width joiner + table[0x200d] = None + # word joiner + table[0x2060] = None + # BOM + table[0xfeff] = None + return table @cached_property -- cgit v1.2.3