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 ampersand HTML escape in dropdown #3205

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Mar 10, 2025

fix #3199 (comment)

also escape &, relying on special escape grammar can be dangerous

@mvorisek mvorisek marked this pull request as draft March 10, 2025 22:54
@mvorisek mvorisek changed the title Fix ampersand HTML escape Fix ampersand HTML escape in dropdown Mar 10, 2025
@@ -3838,24 +3838,21 @@

return text.replace(regExp.escape, '\\$&');
},
htmlEntities: function (string, forceAmpersand) {
forceAmpersand = typeof forceAmpersand === 'number' ? false : forceAmpersand;
htmlEntities: function (string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK why forceAmpersand was introduced in #2705. What is the usecase when ampersand "must not be escaped to make things safe"?

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.

[Dropdown] multiple issues with remote data and multiple
1 participant