Strips all undesirable characters out of potential file paths.

def sanitize(value):
    """Strips all undesirable characters out of potential file paths."""

    value = unicodedata.normalize('NFKD', value)
    value = value.strip()
    value = re.sub('[^./\w\s-]', '', value)
    value = re.sub('[-\s]+', '-', value)

    return value