2016-12-16 00:29:59 -06:00

10 lines
300 B
Python

"""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