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

font-patcher: Sanitize output filenames #1029

Merged
merged 1 commit into from
Dec 22, 2022
Merged

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Dec 22, 2022

[why]

The filename is determined by the font (family) name. The font name might include characters that are forbidden to use in filenames.

[how]

Filter output filesnames and prevent any character that is likely forbidden under Windows.
Also prevent control characters.

Translate Windows path separators to posix.

Fixes: #632

Requirements / Checklist

What does this Pull Request (PR) do?

Replace problematic chars from the output filename with an underscore _

How should this be manually tested?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

[why]
The filename is determined by the font (family) name. The font name
might include characters that are forbidden to use in filenames.

[how]
Filter output filesnames and prevent any character that is likely
forbidden under Windows.
Also prevent control characters.

Translate Windows path separators to posix.

Fixes: #632

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii merged commit 5c5c51e into master Dec 22, 2022
@Finii Finii deleted the bugfix/sanitize-outfilename branch December 22, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Patcher does not check for illegal characters in output filename
1 participant