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
This commit is contained in:
blankie 2022-10-19 22:54:57 +07:00
parent 33dd6c98c7
commit a4519a1089
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 6 additions and 0 deletions

View File

@ -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'<a href="{submission.shortlink}">{html.escape(title)}</a>' if title else submission.shortlink