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

[JENKINS-59846] Reintroduce automatic hyperlinking of URLs in JUnit test output, safely #669

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BonusLord
Copy link

Resolves #481 by reintroducing automatic linkifying of URLs in JUnit test output. After being converted into tags, the links are passed through an HTML sanitization library to ensure they are not malicious.

This is a slight rework of #555 that resolves some of the problems that the sanitizer was causing by only passing the hyperlinks through the sanitizer, while using the classic simple sanitization method for all other output text.

Some screenshots to illustrate what this looks like in practice:

Test code:
image

Test result page in Jenkins:
image

Testing done

  • Added / updated test cases
  • Ran mvn verify and verified that it succeeded
  • Did some manual testing (shown in screenshots)

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@BonusLord BonusLord requested a review from a team as a code owner December 18, 2024 21:09
@timja timja requested a review from jtnord December 18, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore the ability to include clickable links in test output
2 participants