bramses / chatgpt-md

A (nearly) seamless integration of ChatGPT into Obsidian.
MIT License
824 stars 61 forks source link

Sanitize file title before setting it as the filename #93

Open hemant6488 opened 10 months ago

hemant6488 commented 10 months ago

I recently ran into an error where the infer title function resulted in the following filename (ls -al output):

-rw-r--r--@  1 user  group   3.7K Jul 29 12:27 Code Explanation Undefined Values in Output??Assistant Response Undefined values in the output.md

The ?? is probably some special characters that the shell couldn't render. This filename breaks the remotely-save automation with a 400 bad request error.

lukemt commented 10 months ago

In general it is safe to say that software is something weird