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

Fix escaping handling in formatUserName() and getUserName() #17872

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

cedric-anne
Copy link
Member

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.

Description

Still a draft, tests may fail.

  1. I splitted the getUserName() and formatUserName() methods to have one that retunrs a raw username (getUserName()/formatUserName()) and one that returns a HTML link (getUserLink()/formatUserLink()).
  2. getUserName() had a $link=2 parameter value that completely changed its behaviour to return the user inforcard + the user link + the link URL. I moved this info card generation into a User::getInfoCard() method.

@cedric-anne cedric-anne self-assigned this Sep 17, 2024
@cedric-anne cedric-anne mentioned this pull request Sep 17, 2024
4 tasks
@cedric-anne
Copy link
Member Author

@AdrienClairembault Could you help me to indentify what could cause something like an infinite loop in tests\units\Glpi\Form\AnswersSetTest::testDisplayTabContentForItem ?

@cedric-anne cedric-anne force-pushed the 11.0/escape-username branch 2 times, most recently from 96b8e29 to 78c02c9 Compare September 18, 2024 06:14
@cedric-anne cedric-anne marked this pull request as ready for review September 18, 2024 07:17
@trasher trasher merged commit dfd1386 into glpi-project:main Sep 18, 2024
6 of 7 checks passed
@cedric-anne cedric-anne deleted the 11.0/escape-username branch September 18, 2024 09:15
@cedric-anne cedric-anne mentioned this pull request Sep 26, 2024
2 tasks
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 this pull request may close these issues.

3 participants