Skip to content

Escape inline HTML report script sentinels#40139

Open
graffhyrum wants to merge 1 commit intomicrosoft:mainfrom
graffhyrum:fix/html-report-inline-script-escape
Open

Escape inline HTML report script sentinels#40139
graffhyrum wants to merge 1 commit intomicrosoft:mainfrom
graffhyrum:fix/html-report-inline-script-escape

Conversation

@graffhyrum
Copy link
Copy Markdown

Fixes #40134

Escape any closing script-tag sentinels before inlining the HTML reporter's report.js bundle into index.html.

This prevents the browser from terminating the inline <script type="module"> element early when the bundle contains \u003c/script sequences.

Regression test: adds a reporter-html test that inspects the generated index.html and verifies the sentinel is escaped before serving the report.

Verification note: I could not run the full Playwright test target in this checkout because the stable test runner dependencies are not installed here.

@graffhyrum
Copy link
Copy Markdown
Author

@graffhyrum please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

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.

HTML report breaks when inlined report.js contains </script>

1 participant