Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Invalid HTML generated by org.testng.reporters.jq.SuitePanel#generateMethod #199
Line 86 in SuitePanel adds the message from a Throwable to the generated HTML output without escaping reserved characters, which causes rendering issues when such characters are present in the message. For example, given this test:
The generated output is:
However, the correct output should be:
The naive fix would probably look something like this:
But this should probably be generalized into a utility class or the like. commons-lang provides HTML escaping features that may be useful as inspiration for this.