10 lines
300 B
Python
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
|