-
-
Notifications
You must be signed in to change notification settings - Fork 835
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: evaluated page title content #3684
Conversation
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
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.
As mentioned on Discord I don't really like the use of innerHTML
since its behavior on <title>
isn't precisely described in the official web spec, but I'm hopeful we will be able to drop it in a future release once #3685 is fixed.
I have not tested this specific PR but I played around with the same changes on my dev-main install and the changes proposed work well in my local tests.
Co-authored-by: David Wheatley <hi@davwheat.dev>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: evaluated page title content * chore: add comment * chore: use DOMParser instead * fix: use `innerHTML` for the actual value Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> Co-authored-by: David Wheatley <hi@davwheat.dev>
* fix: evaluated page title content * chore: add comment * chore: use DOMParser instead * fix: use `innerHTML` for the actual value Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> Co-authored-by: David Wheatley <hi@davwheat.dev>
Changes proposed in this pull request:
Properly escapes HTML entities when setting page titles. Otherwise, any decoded title content is evaluated as HTML code.
Necessity
Confirmed
composer test
).