Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize paths/filenames? #7048

Open
kendrakirai opened this issue Feb 23, 2025 · 2 comments
Open

Sanitize paths/filenames? #7048

kendrakirai opened this issue Feb 23, 2025 · 2 comments

Comments

@kendrakirai
Copy link

I seem to be running up against some filenames that are either much too long, or have characters that aren't supported by windows in filenames. Any chance of adding a limiter and/or file/path sanitizer?

@mikf
Copy link
Owner

mikf commented Feb 23, 2025

Replacing/removing invalid characters is handled by path-restrict and path-remove.

To limit filename length, use [...] or [b...] e.g. {title[b:200]}.
See https://gdl-org.github.io/docs/formatting.html

@kendrakirai
Copy link
Author

kendrakirai commented Feb 24, 2025

I have no idea what any of this means. I don't want everything to match a string, I just want to be able to download files with "&" in the name because it follows a patreon post name, or cut-off filemames that are like 100+ characters long.

Edit: okay, path restrict and remove seem usable for the former but not the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants