10 lines
300 B
Python
Raw Permalink Normal View History

"""Utility functions."""
CHARACTERS_TO_REPLACE = ["/", ":", " ", "?", "!", "&", ",", "'", '""']
def sanitize_title(title):
"""Sanitizes the given title by removing certain characters."""
for character in CHARACTERS_TO_REPLACE:
title = title.replace(character, "-")
return title