Skip to content

Commit

Permalink
[patch] Fixed whitelist blocking \n out
Browse files Browse the repository at this point in the history
  • Loading branch information
Exenifix committed Jul 25, 2022
1 parent 4612934 commit d4e8391
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/filters/whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@


def contains_fonts(allowed_symbols: str, content: str) -> tuple[bool, set[str]]:
content = content.strip().replace("\n", "").replace(" ", "").lower()
allowed_symbols = set(allowed_symbols)
allowed_symbols.add(" ")
content = set(demojize(content.replace(" ", "").lower()))
content = set(demojize(content))
return not allowed_symbols >= content, content - allowed_symbols

0 comments on commit d4e8391

Please sign in to comment.