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

Weird game titles can cause game exports to have a .txt extension #933

Open
Auroriax opened this issue Jul 20, 2022 · 4 comments
Open

Weird game titles can cause game exports to have a .txt extension #933

Auroriax opened this issue Jul 20, 2022 · 4 comments

Comments

@Auroriax
Copy link

For example, calling a game just < will cause the export download filename to be html.txt instead of a file with the HTML extension. The exported file is actual HTML, but the extension is incorrect.

Might be (loosely) related to #932?

@increpare
Copy link
Owner

Sorry for the tardy reply, but could you let me know what browser + OS you were using? (I just tried it on MacOS 13.2.1 with Safari Version 16.3 (18614.4.6.1.6), and Chrome 110.0.5481.177, and now I have "<.html" and "_.html" respectively in my downloads folder).

@Auroriax
Copy link
Author

I can still reproduce this issue on Windows 10 with Firefox 110.0.1 (64-bits).

Just hypothesizing, but I'm not sure if the reserved filename characters are the same between Windows and MacOS, and that the browser thus handles it differently? For example, < is a reserved character on Windows, but seems allowed in MacOS.

@zzo38
Copy link

zzo38 commented Aug 28, 2023

As far as I know, this is probably not a bug. It is the browser which has to handle file names, according to the operating system, and if a web page or HTTP server specifies a file name which is not valid then it will be necessary for the browser to change it (or to allow the user to specify a different file name).

@david-pfx
Copy link
Contributor

In my opinion the exported filename should be sanitised, replacing risky characters by something safer. I've done this with PS Next.

The choice of risky characters IMO should allow games to be exported so 'it just works' on any browser, any O/S.

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

4 participants