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

Raw HTTP Logs fail to escape HTML #3264

Closed
sopoforic opened this issue Jun 30, 2022 · 0 comments · Fixed by #3270
Closed

Raw HTTP Logs fail to escape HTML #3264

sopoforic opened this issue Jun 30, 2022 · 0 comments · Fixed by #3270

Comments

@sopoforic
Copy link

Describe the bug

In the HTML report, any HTML in the Raw HTTP Logs is not escaped, resulting in a broken page. Sample:

<div style="margin-left: -15px;margin-top: 10px; background: #0c5460">  Request <b><span style="color:#0AA">GET /session/7e1bd001-e2c6-4a04-bd6c-70a4c449d2cb/element/da9be8f0-a5b9-420f-b425-160a6369603e/text  </span></b></div><div><span style="color:#0A0">''<span style="color:#FFF"></span></span></div><div style="margin-left: -15px;margin-top: 10px; background: #0c5460">  Response 404 GET /session/7e1bd001-e2c6-4a04-bd6c-70a4c449d2cb/element/da9be8f0-a5b9-420f-b425-160a6369603e/text (166ms)</div><div>{
     value: {
       error: <span style="color:#0A0">'stale element reference'<span style="color:#FFF">,
       message: <span style="color:#0A0">'The element reference of <a class="link-external" href="https://www.example.com/"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed'<span style="color:#FFF">,
       stacktrace: <span style="color:#0A0">''<span style="color:#FFF">
     }
  }</span></span></span></span></span></span></div>

Now the rest of the page is part of the (unclosed) <a> element, and therefore it's not possible to click to expand sections below that point.

Your Environment

Executable Version
nightwatch --version 2.2.2
npm --version 8.13.2
node --version v16.15.1
Browser driver Version
NAME VERSION
geckodriver v0.30.0
OS Version
NAME VERSION
Debian GNU/Linux 11 (bullseye)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants