When creating or renaming notes in Obsidian, I often paste titles copied from articles, web pages, questions, or headings. These frequently contain characters that are invalid in filenames, such as :, ?, *, etc.
Currently, if I paste a title containing invalid characters, Obsidian shows an error, but if I click away from the title field, the pasted text disappears entirely. I then have to paste the title again and manually search for and replace the invalid characters myself.
This interrupts workflow and becomes frustrating when creating many notes from copied titles.
Proposed solution
Preserve invalid title text
If a pasted title contains invalid filename characters, keep the user’s original text in the title field even while showing the validation error. This would allow the user to quickly edit the invalid characters without losing the pasted text.
Optional automatic sanitization
Additionally, it would be helpful to offer a quick action/button to automatically replace invalid characters with safe alternatives such as:
spaces
_
-
.
Example: What is AI?: A beginner's guide*
could automatically become: What is AI - A beginner's guide
This would make note creation much smoother when working with copied titles.
Current workaround (optional)
Currently I have to:
Paste the title
See the error
Re-paste the title after it disappears
Manually remove or replace the invalid characters
Sometimes I pre-clean titles in another text editor before pasting them into Obsidian.