Skip to content

Strings in angle brackets are deleted from report #740

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

Closed
gscelsi opened this issue Sep 19, 2023 · 4 comments · Fixed by #757
Closed

Strings in angle brackets are deleted from report #740

gscelsi opened this issue Sep 19, 2023 · 4 comments · Fixed by #757

Comments

@gscelsi
Copy link

gscelsi commented Sep 19, 2023

Any string enclosed in angle brackets "<>", where the first character after the opening bracket is not blank, is removed from the output html report. Sometimes strange effects also occur, as it is the case in example #8 with the insertion of a double-quotes character.

pytest-html v. 4.0.1
pytest 7.4.2

pytest-html-bug.tar.gz

@jeffwright13
Copy link
Collaborator

My guess: Angle brackets are what defines HTML tags, so what you are probably seeing is rendered HTML. If the code inside your angle brackets is not valid HTML it will just be ignored by the browser, making it seem like it just disappered.

@gscelsi
Copy link
Author

gscelsi commented Sep 19, 2023

My guess: Angle brackets are what defines HTML tags, so what you are probably seeing is rendered HTML. If the code inside your angle brackets is not valid HTML it will just be ignored by the browser, making it seem like it just disappered.

I would expect pytest-html to quote any test output when inserting it into its own html code. Is that not the case?

@BeyondEvil
Copy link
Contributor

I would expect pytest-html to quote any test output when inserting it into its own html code. Is that not the case?

The boring answer is "it depends".

Can you share some code that I can use to repro what you're seeing? Preferably with a screenshot of what the result is.

@gscelsi
Copy link
Author

gscelsi commented Sep 20, 2023 via email

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 a pull request may close this issue.

3 participants