Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

[bug] "malformed URI sequence" error for filenames with a percent sign (%) in them #137

Closed morepurplemorebetter closed 10 months ago

morepurplemorebetter commented 10 months ago

I agree, percent signs (%) in URI are a bad idea, but some 3rd-party asset creator didn't think of that and it took me a while to figure out exactly which file was the culprit, as it was causing the whole caching to fail.

The issue is with the getFileName function here in utils.js.

Known workarounds for this issue are not great. I think adding a try { ... } catch (err) { ... } might be the best way to go and add a warning message on error (or just to the console).

Aedif commented 10 months ago

A console warning will now be thrown if such an image is detected instead of crashing out of caching.

https://github.com/Aedif/TokenVariants/releases/tag/4.54.0