mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-22 06:17:58 -05:00
allow tags to contain chars, not only English alphabet (#801)
* allow tags to contain chars, not only English alphabet
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user