GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

[$20.00 bounty] In a filepath a hashtag broke the preview

Open Bouh opened this issue 2 years ago • 4 comments

Describe the bug

In a filepath a hashtag broke the preview of the file in the scene editor, and in the resource tab, but the file is loaded in the preview.

To Reproduce

Correct: E:\Réalisations\GDevelop_branding\Press\itch.io\Game Jam\Weekend Jam - 1\Parts\hero.png Bugged: E:\Réalisations\GDevelop_branding\Press\itch.io\Game Jam\Weekend Jam #1\Parts\hero.png

image

Other details

GD 5.0.136 Windows 10

Bouh avatar Jun 10 '22 08:06 Bouh

Bouh has contributed $5.00 to this issue on Rysolv.

The total bounty is now $5.00. Solve this issue on Rysolv to earn this bounty.

rysolv-bot avatar Jun 17 '22 12:06 rysolv-bot

This is due to how < img > tag treats # and in general, they shouldn't be used in file names. The best solution is likely to add https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent to all file paths to ensure all issues are caught. I don't have time currently to read how to contribute to this and do the changes but this should help anyone looking very quickly.

jposeyjr avatar Jun 21 '22 09:06 jposeyjr

Silver-Streak has contributed $15.00 to this issue on Rysolv.

The total bounty is now $20.00. Solve this issue on Rysolv to earn this bounty.

rysolv-bot avatar Jun 23 '22 08:06 rysolv-bot