Skip to content

Commit

Permalink
Search names with special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Dec 5, 2022
1 parent 87fdefb commit c74ea56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ynr/apps/search/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def search_person_by_name(name: str, synonym: bool = False) -> PersonQuerySet:
"""
name = name.lower()
if "ë" in name:
name = name.replace("ë", "e")
name = re.sub(r"[^a-z ]", " ", name)
name = " ".join(name.strip().split())
if not name:
Expand Down

0 comments on commit c74ea56

Please sign in to comment.