mcdamo / tab-image-saver

Firefox addon to save images from open tabs
https://addons.mozilla.org/firefox/addon/tab-image-saver/
Mozilla Public License 2.0
40 stars 13 forks source link

"Filename must not contain illegal characters" #80

Closed doio closed 2 years ago

doio commented 2 years ago

Sample image: https://pbs.twimg.com/profile_banners/63889851/1587335132

Tab Image Saver will fail to download the image.

Tried turning off Enhanced Tracking Protection for pbs.twimg.com.

Using default rules:

And a custom path rule:

I am also referencing #76 because this kind of URL and that in #76 are now showing the same error:

Error shows Filename must not contain illegal characters. xxx/pbs.twimg.com/1587335132 (JPEG Image, 1024 x 768 pixels).jpg

But the images are saving with no problems earlier.

mcdamo commented 2 years ago

Thanks for your informative report.

There are some problems in Firefox v102+ stemming from a filename validation bug.

The tab title you are using contains unicode space character U+00A0 and this appears to be triggering the bug. A quick workaround is to replace it with standard space: ${host}/${tabTitle.replace(/\u00A0/g, ' ')}.${ext||xExt||xMimeExt||'jpg'}

doio commented 2 years ago

This is to me a bug never heard of and thank you for the solution! Really appreciate it. :D I am also glad that it's noticed and resolved.