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

regression: nested html tables in html reports #420

Closed
richard-melvin opened this issue May 25, 2016 · 6 comments
Closed

regression: nested html tables in html reports #420

richard-melvin opened this issue May 25, 2016 · 6 comments

Comments

@richard-melvin
Copy link

With v1.1.31 and before, it was possible to include html markup (e.g. tables) in test logs, e.g. as:

@Step
public void showPacketContents(String html)

With v1.1.34, the contents of the html string seems to get processed by Formatter.formatWithFields which replaces the html markup with &lt etc. This doesn't seem to be overridable or configurable.

Could there be some way of indicating a particular argument to a Step method is already html-encoded and so shouldn't be re-encoded?

@richard-melvin
Copy link
Author

image

@wakaleo
Copy link
Member

wakaleo commented May 25, 2016

Thanks for pointing this out. This change is due to a bug fix where formatted HTML or XML was being incorrectly treated as part of the HTML page, but we will think of some way of allowing both behaviours.

@richard-melvin
Copy link
Author

I can see there has been some markdown support added, which would work to solve this problem (as markdown is allowed to contain embedded html). However, the new code in Formatter.java seems to:

  • render the markdown to html
  • escape the html, e.g. <table class="packets" width="100%"

Is that working as intended? Is there any way to customize or override that behavior?

@wakaleo
Copy link
Member

wakaleo commented Sep 19, 2017

Have you tried using the enable.markdown property, eg

enable.markdown = story,narrative,step

@richard-melvin
Copy link
Author

yes, added enable.markdown = [story,narrative,scenario,step] to serenity.conf, and confirmed by debugger that it does call the renderMarkdown method.

@wakaleo
Copy link
Member

wakaleo commented Sep 19, 2017

Most likely a bug then (though you shouldn't have square brackets in the property value).

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants