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

don't perform HTML escaping for server constants to avoid breaking alphabetical index for diacritics #1575

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

osma
Copy link
Member

@osma osma commented Jan 8, 2024

Reasons for creating this PR

Alphabetical index was broken for diacritics like Ä, Ä, Ö. This happened because of too strict/eager input sanitizing. This PR fixes the problem (on the master branch, but not skosmos-3 which may be affected too) by reducing the input sanitizing, just performing escaping of quotes. (I'm not sure that's 100% correct either)

Link to relevant issue(s), if any

Description of the changes in this PR

  • switch input filtering of server constants from FILTER_SANITIZE_FULL_SPECIAL_CHARS to FILTER_SANITIZE_ADD_SLASHES

Known problems or uncertainties in this PR

  • See if the same problem applies for the skosmos-3 branch and fix it there as well

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@osma osma added the bug label Jan 8, 2024
@osma osma added this to the Next Tasks milestone Jan 8, 2024
Copy link

sonarcloud bot commented Jan 8, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a1cd362) 70.33% compared to head (9d8511f) 70.33%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1575   +/-   ##
=========================================
  Coverage     70.33%   70.33%           
  Complexity     1669     1669           
=========================================
  Files            32       32           
  Lines          4305     4305           
=========================================
  Hits           3028     3028           
  Misses         1277     1277           

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

@osma osma modified the milestones: Next Tasks, 2.x Jan 8, 2024
@osma osma merged commit 0801abd into master Jan 8, 2024
12 of 14 checks passed
@osma osma deleted the issue1574-alphabetical-index-diacritic-fix branch January 23, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alphabetic tab doesn't work with certain diacritic letters
1 participant