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

Some chars in prelude tags are not escaped properly, and these can cause exported games to fail compilation #932

Closed
Auroriax opened this issue Jul 20, 2022 · 6 comments · May be fixed by #967

Comments

@Auroriax
Copy link

e.g. if you give a game the title of a HTML tag, for example <script>, then you will be allowed to share export the game, but for the export, the generated file is not valid HTML5 and it will cause the HTML5 code to run into errors and the game to fail to load. It seems that some characters (the < and > brackets in this example, possibly more) are not always escaped properly.

Note that this only affects exported games and not share links.

@david-pfx
Copy link

I suggest you supply an explicit repro case including a sample (tiny) game.

@increpare
Copy link
Owner

increpare commented Mar 6, 2023

it's ok, there's already a repro in the linked issue; i'm just lazy

@david-pfx
Copy link

I thought I might have a look at it, but since I can't build the standalone right now I guess there isn't much point.

@david-pfx
Copy link

I've had a look, I can fix it. But I don't see any easy way to test it.

My motto is: if you can't test it don't write it. Might have to make an exception for this one.

david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Mar 8, 2023
Illegal characters in file name or script are replaced by "!", and a warning emitted.
david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Apr 23, 2023
Illegal characters in file name or script are replaced by "!", and a warning emitted.
david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Apr 24, 2023
@david-pfx
Copy link

Replaced by single purpose PR

@increpare increpare reopened this Apr 26, 2024
@increpare
Copy link
Owner

increpare commented Apr 26, 2024

https://www.puzzlescript.net/play.html?p=1564d25b0c0eac9b02c8c77ea4f1bfc3

the homepage url is displayed incorrectly in the compiled version, but correctly in the uncompiled version, it seems, lol

src/standalone_inlined.txt
<a id="homepagelink" href="__HOMEPAGE__" target="_blank">__HOMEPAGE_STRIPPED_PROTOCOL__</a>

bin/standalone_inlined.txt

<a id=homepagelink href=__HOMEPAGE__ target=_blank>__HOMEPAGE_STRIPPED_PROTOCOL__</a>

lol....

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

Successfully merging a pull request may close this issue.

3 participants