yuya373 / emacs-slack

slack client for emacs
1.11k stars 117 forks source link

Avoid cache file names with illegal characters #515

Closed pcrama closed 4 years ago

pcrama commented 4 years ago

I use emacs-slack with Emacs 27.0.01 on Microsoft Windows and sometimes, some images refuse to load. The issue was that the channel contained images with urls like http://example.com/image.jpg?crop=1:2;3:4. The ':' in extension would get included in the cache path name, but ':' is a reserved character on that platform.

This patch tries to keep the file extension, while hiding the URL query string that follows it.

yuya373 commented 4 years ago

Great! Thanks