sanitized_filename = ActiveEncode.sanitize_base input_url is used when creating the file path for output files. If input_url contains a long query string such as is seen with Sharepoint download urls, the path cannot be created and the encode will fail. This may be due to file path length restrictions or possibly disallowed sequences of characters?
The sanitize_base method has handling for HTTP URIs that strips the query string, so we can convert strings starting with 'http' or 'https' to the URI class and rely on the handling already present in the sanitizer.
sanitized_filename = ActiveEncode.sanitize_base input_url
is used when creating the file path for output files. Ifinput_url
contains a long query string such as is seen with Sharepoint download urls, the path cannot be created and the encode will fail. This may be due to file path length restrictions or possibly disallowed sequences of characters?The
sanitize_base
method has handling for HTTP URIs that strips the query string, so we can convert strings starting with 'http' or 'https' to the URI class and rely on the handling already present in the sanitizer.