Item logo image for HTML to Markdown Converter

HTML to Markdown Converter

5.0 (

21 ratings

)
Extension Tools 3,000 users

1 support issue

  • All
  • Questions
  • Suggestions
  • Problems

Guybrush Threepwood

Apr 25, 2025

Invalid File Name Error in "Download File" Feature

### The Problem:
When I try to save the converted Markdown content, I receive the error: **"Invalid filename"**. This prevents me from proceeding, even though the content itself looks clean. I suspect the error arises when the filename contains characters like `/`, `:`, or spaces (common in web content). The extension blocks entirely instead of allowing me to fix the filename.

### Proposed Solution:
Instead of stopping, the extension could:
1. **Sanitize the filename** by removing or replacing invalid characters (e.g., replacing `/` with `_` or stripping spaces).
2. Proceed with the download using the cleaned filename.

This would keep the "Download File" workflow intact while ensuring files can be saved without errors.

### How to Implement This:
- Locate the code responsible for generating filenames (e.g., when the user selects "Download" or "Save").
- Add a function to sanitize filenames by:
- Replacing invalid characters (e.g., `/` → `_`, `:` → `-`, etc.) or remove them.
- Truncating excessively long filenames if needed.
- Test with sample content containing problematic characters to confirm it works.

Google apps
Create a Mobile Website
View Site in Mobile | Classic
Share by: