forked from MarseyWorld/MarseyWorld
nasty hack to stop underscores being interpreted as italic which breaks mentioning users with two underscores and links sometimes
parent
0762f179b7
commit
daedb5f047
|
@ -367,7 +367,9 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
|||
|
||||
sanitized = strikethrough_regex.sub(r'\1<del>\2</del>', sanitized)
|
||||
|
||||
sanitized = sanitized.replace('_', '▔')
|
||||
sanitized = markdown(sanitized)
|
||||
sanitized = sanitized.replace('▔', '_')
|
||||
|
||||
# replacing zero width characters, overlines, fake colons
|
||||
sanitized = sanitized.replace('\u200e','').replace('\u200b','').replace("\ufeff", "").replace("\u033f","").replace("\u0589", ":")
|
||||
|
|
Loading…
Reference in New Issue