4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
8.05k stars 765 forks source link

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

Open Bouh opened 2 years ago

Bouh commented 2 years ago

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

rysolv-bot commented 2 years ago

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.

jposeyjr commented 2 years ago

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.

rysolv-bot commented 2 years ago

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.

rishabhguptareal commented 1 month ago

I can resolve this can you assign this to me