[Bruno-cli] HTML Report fails to generate if API response contains JS replace sequences #3311
Open
2 tasks done
Labels
bug
Something isn't working
I have checked the following:
Describe the bug
When an API response contains one of the replace special commands, the HTML report can generate invalid HTML.
In my specific case, the API answers with a string containing "$'", so the HTML reports duplicates the end part multiple times.
To reproduce, use the below bru file with an API answering with a "$'" anywhere.
Then use
The report is then invalid HTML
A simple fix would be, in the
reporters/html.js
file, to replace all $ in the results with $$ to prevent these sequences (this could have side effects).bru file to reproduce the bug
Screenshots/Live demo link
The request
The report
The HTML file (with bogus type so gh allows it) is here, we can see line 402 that the replace sequence has been replaced with HTML code
The text was updated successfully, but these errors were encountered: