sanitize hashtags
This commit is contained in:
parent
b3bac5c662
commit
9e1471c9d2
2
main.py
2
main.py
@ -40,7 +40,7 @@ ChatFilter = F.chat.id.in_(set(map(int, os.environ['USERS'].split(','))))
|
||||
|
||||
|
||||
def format_tags(tags: Iterable[str]):
|
||||
return ' '.join(f'#{tag}' for tag in tags) or 'None'
|
||||
return ' '.join(f'#{re.sub(r"[^0-9a-zA-Z_]", "_", tag)}' for tag in tags) or 'None'
|
||||
|
||||
|
||||
def recover_url(file: E621PostFile):
|
||||
|
Loading…
Reference in New Issue
Block a user