Skip to content

fix: Escape the URL in the page-ready check - #317

Open
Blizzeq wants to merge 2 commits into
plotly:mainfrom
Blizzeq:fix/316-escape-url-in-ready-check
Open

Blizzeq wants to merge 2 commits into
plotly:mainfrom
Blizzeq:fix/316-escape-url-in-ready-check

Conversation

@Blizzeq

@Blizzeq Blizzeq commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Closes #316

_check_document_ready put the URL into a JS template literal unescaped, so a backtick raised a SyntaxError that create_and_wait counted as a load, and a ${...} sequence ran in the page. The URL now goes through json.dumps, as suggested in the issue, and a new test covers both cases. I left the exceptionDetails check from the issue notes out of this PR and can add it here or in a follow-up, whichever you prefer. This touches the same lines as #295, so whichever lands second will need a small rebase.

Build the JS string with json.dumps instead of a template literal, so a
backtick or a ${...} sequence in the URL is compared as plain text.
@camdecoster camdecoster self-assigned this Oct 1, 2026

This branch has not been deployed

No deployments
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 this pull request may close these issues.

[BUG]: Some JS characters aren't escaped when running the page-ready check

2 participants