Fix HTML entity encoding in greeting header with special characters
What does this MR do and why?
When usernames contain special characters like apostrophes (e.g., "O'Brien"), they were being displayed as HTML entities (e.g., "O'Brien") instead of the actual character because sprintf was HTML-encoding the name parameter for XSS protection. However, since the user's name comes from gon.current_user_fullname, which is already a trusted server-rendered value, this escaping is unnecessary and creates unwanted HTML entities in the greeting text. The fix passes false as the third parameter to sprintf to disable HTML escaping while maintaining full i18n compatibility, producing the correct display output.
References
Closes Frontend - Special characters wrongly displayed... (#584428 - closed) • Austin Regnery • 18.9
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
How to set up and validate locally
- Enter a Display name that has special characters
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

