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

Update superboxselect.js to version 1.6 and add HTML entity encoding #16702

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

matdave
Copy link
Contributor

@matdave matdave commented Feb 4, 2025

What does it do?

Updates superbox select to the latest version from Dan Humphrey (which is still old, just newer). I've also added an htmlEncode function to the value and display fields, so they do not break the manager if you use special characters.

Why is it needed?

Using special characters in the value or display field of the superbox select can lead to broken functionality.

How to test

The easiest way to test is to create a multi-list TV and add special characters to the values. For my testing I was having the most issues with ", &, and < characters in various combinations. If you test the output and save before and after this fix, you will find that the output and the stored results are not what you put in. After this fix, the output and stored results will match your options.

Related issue(s)/PR(s)

Found while working on a client site.

@matdave matdave changed the title 3.x - Update superboxselect.js to version 1.6 and add htmlEntity encoding 3.x - Update superboxselect.js to version 1.6 and add HTML entity encoding Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.53%. Comparing base (b1a02c3) to head (2e2fb1d).
Report is 17 commits behind head on 3.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.x   #16702      +/-   ##
============================================
- Coverage     21.53%   21.53%   -0.01%     
+ Complexity    10734    10733       -1     
============================================
  Files           565      565              
  Lines         32540    32542       +2     
============================================
  Hits           7007     7007              
- Misses        25533    25535       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@theboxer theboxer left a comment

Choose a reason for hiding this comment

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

🚀

@rthrash rthrash added the bug The issue in the code or project, which should be addressed. label Feb 4, 2025
@rthrash rthrash added this to the v3.1.1 milestone Feb 4, 2025
@rthrash rthrash added the needs-backport Issues that need to be backported to the previous maintenance version. label Feb 4, 2025
@opengeek opengeek changed the title 3.x - Update superboxselect.js to version 1.6 and add HTML entity encoding Update superboxselect.js to version 1.6 and add HTML entity encoding Feb 6, 2025
@opengeek opengeek merged commit b7a844a into modxcms:3.x Feb 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed. needs-backport Issues that need to be backported to the previous maintenance version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants