Skip to content
  • Remi Rampin's avatar
    Separate validating, tweaking, and sanitizing · f83f263b
    Remi Rampin authored
    Some validation functions only validated, while some would actually make
    a tweaked version and return it. This caused some issues where the
    function was called incorrectly (it returns the new value, which
    evaluates to True, but if the value is different this should be
    interpreted as a failed validation).
    
    The value-returning functions are now prefixed by `fix_` and have a
    purely-validating counterpart.
    
    In addition, don't bother sanitizing document filenames for filesystem
    use, just make sure they aren't very long. Sanitize them when we
    actually write to disk (e.g. in convert.py).
    f83f263b