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 filename prior to creating contact files #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

quinn-p-mchugh
Copy link

@quinn-p-mchugh quinn-p-mchugh commented Aug 6, 2024

Some of my Google Contacts contain characters that are incompatible with Windows file systems, such as <>:"/\\|?*. This caused an error when trying to create markdown files for these contacts.

This pull request adds a method to the md_person class called _sanitize_filename and uses that method to replace these invalid characters with underscores before markdown files are created. This prevents errors with trying to create files with invalid paths.

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.

1 participant