From a4519a108954fe87f5535f2b81810705ecec3643 Mon Sep 17 00:00:00 2001 From: blankie Date: Wed, 19 Oct 2022 22:54:57 +0700 Subject: [PATCH] Add more characters to white space check https://redd.it/y3nbdr Related Unicode characters with property White_Space=no in https://en.wikipedia.org/wiki/Whitespace_character#Unicode --- redditbot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/redditbot.py b/redditbot.py index c73500a..8997117 100644 --- a/redditbot.py +++ b/redditbot.py @@ -101,6 +101,12 @@ def title_or_shortlink(submission): '\u202F', # narrow no-break space '\u205F', # medium mathematical space '\u3000', # ideographic space + '\u180E', # mongolian vowel separator + '\u200B', # zero width space + '\u200C', # zero width non-joiner + '\u200D', # zero width joiner + '\u2060', # word joiner + '\uFEFF', # zero width non-breaking space ))) return f'{html.escape(title)}' if title else submission.shortlink