Fabrik als Provider Korrigiert
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import unicodedata
|
||||
|
||||
|
||||
def normalize_search_text(value: str | None) -> str:
|
||||
if not value:
|
||||
return ""
|
||||
|
||||
value = (
|
||||
value.casefold()
|
||||
.replace("ä", "ae")
|
||||
.replace("ö", "oe")
|
||||
.replace("ü", "ue")
|
||||
.replace("ß", "ss")
|
||||
)
|
||||
normalized = unicodedata.normalize("NFKD", value)
|
||||
return "".join(char for char in normalized if not unicodedata.combining(char))
|
||||
Reference in New Issue
Block a user