allow tags to contain chars, not only English alphabet (#801)

* allow tags to contain chars, not only English alphabet
This commit is contained in:
Markos Gogoulos
2023-06-13 15:41:13 +03:00
committed by GitHub
parent 5b601698a4
commit c866fdd6ba
3 changed files with 13 additions and 8 deletions

View File

@@ -785,3 +785,11 @@ def clean_query(query):
query = query.replace(char, "")
return query.lower()
def get_alphanumeric_only(string):
"""Returns a query that contains only alphanumeric characters
This include characters other than the English alphabet too
"""
string = "".join([char for char in string if char.isalnum()])
return string.lower()