def slugify(value: str) -> str:
value = str(value)<EOL>value = unicodedata.normalize('<STR_LIT>', value).encode('<STR_LIT:ascii>', '<STR_LIT:ignore>').decode('<STR_LIT:ascii>')<EOL>value = re.sub(r'<STR_LIT>', '<STR_LIT>', value).strip()<EOL>return mark_safe(re.sub(r'<STR_LIT>', '<STR_LIT:->', value))<EOL>
Convert spaces/dots to hyphens.
Remove characters that aren't alphanumerics, underscores, or hyphens.
Also strip leading and trailing whitespace.