Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWT preloader doesn't use percent-encoding #7356

Open
Frosty-J opened this issue Mar 2, 2024 · 2 comments
Open

GWT preloader doesn't use percent-encoding #7356

Frosty-J opened this issue Mar 2, 2024 · 2 comments
Assignees

Comments

@Frosty-J
Copy link
Contributor

Frosty-J commented Mar 2, 2024

I noticed today a filename containing a semicolon fails to load on GWT as its path in assets.txt contains a literal ; instead of %3B. This and other reserved characters should be encoded to avoid issues.

String pathOrig = asset.filePathOrig.replace('\\', '/').replace(assetOutputPath, "").replaceFirst("assets/", "");

It would also be an idea to transform the paths to lowercase, though the superDev server is case-sensitive even on Windows so any errors from that should be caught pretty quickly.

Sure, asset names shouldn't contain funny characters to begin with, but they do.

@venktre
Copy link

venktre commented Mar 10, 2024

Can you assign this task to me?
It would be better if you could give me more guidance.

@Frosty-J
Copy link
Contributor Author

No-one's rushing to do anything about this - it can informally be your issue. One possible solution could be:

URLEncoder.encode("Hey; wh@t?!", "UTF-8").replace("+", "%20");

Returns: "Hey%3B%20wh%40t%3F%21"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants