mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-09-27 20:48:56 +02:00
Remove zero width joiner before parsing
This commit is contained in:
parent
f04102f29c
commit
ad15cefb07
1 changed files with 1 additions and 0 deletions
|
@ -89,6 +89,7 @@ def set_flair(submission, flair):
|
|||
text = submission.selftext
|
||||
rawtext = text
|
||||
|
||||
text = text.replace('\u200c', '')
|
||||
text = re.compile(r".*(\{.+\}).*", re.DOTALL).search(text).group(1)
|
||||
# Test if it needs to escape the escape character. Usually happens on fancy mode.
|
||||
try: json.loads(text)
|
||||
|
|
Loading…
Reference in a new issue