-
Notifications
You must be signed in to change notification settings - Fork 298
fix(chore): Resolve many html escape issues #772
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
base: develop
Are you sure you want to change the base?
fix(chore): Resolve many html escape issues #772
Conversation
Thanks @belcirelk I think this needs to be rebased with the current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused on why sometimes unescape
and other times escape
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses HTML escaping and unescaping issues across multiple template files to properly handle user names containing apostrophes or HTML characters, and prevent HTML code in reservation titles and descriptions from breaking page rendering.
- Adds proper HTML unescaping before JavaScript escaping for user names and reservation data in PDF generation
- Implements consistent HTML escaping for reservation titles and descriptions displayed in UI
- Removes redundant HTML escaping from form input values where it's automatically handled
- Updates user name handling in autocomplete functionality to properly decode HTML entities
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tpl/Reservation/pdf.tpl | Adds HTML unescaping before JavaScript escaping for user names, reservation titles, and descriptions in PDF generation |
tpl/Dashboard/dashboard_reservation.tpl | Adds HTML escaping for reservation titles and HTML unescaping for user names in dashboard display |
tpl/Ajax/user_details.tpl | Adds HTML unescaping for user names in popup details |
tpl/Ajax/respopup.tpl | Adds HTML escaping for titles and descriptions, HTML unescaping for user names in reservation popups |
tpl/Admin/Users/user-update.tpl | Removes redundant HTML escaping from form input values |
tpl/Admin/Users/manage_users.tpl | Adds HTML unescaping for user names in user management table |
tpl/Admin/Resources/manage_resources_user_permissions.tpl | Adds HTML unescaping for user names in resource permissions |
tpl/Admin/Reservations/manage_reservations.tpl | Adds HTML escaping for titles/descriptions and HTML unescaping for user names |
Pages/Ajax/AutoCompletePage.php | Adds HTML entity decoding for user names in autocomplete functionality |
The html characters are not (un)escaped properly in many TPLs. This fix the display of user names containing an apostrophe or html code. It also prevent the html display of the description and title of the reservation that can break the html pages. closes LibreBooking#762
46e9469
to
4d897e9
Compare
The html characters are not (un)escaped properly in many TPLs. This fix the display of user names containing an apostrophe or html code. It also prevent the html display of the description and title of the reservation that
can break the html pages.
closes #762