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 diacritic letters in alphabetical index (Skosmos 3) #1580

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

osma
Copy link
Member

@osma osma commented Jan 23, 2024

Reasons for creating this PR

Fix the problem of diacritic letters (ÅÄÖ...) in Skosmos 3. It was already fixed for Skosmos 2 in PR #1575; this PR includes the fixes from that PR and also adds a Cypress test to verify it on the UI level.

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
  • add PHPUnit test to verify server constant sanitizing
  • add Cypress test to verify that diacritic letters work in alphabetical index

Known problems or uncertainties in this PR

n/a

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 23, 2024
@osma osma added this to the 3.0 milestone Jan 23, 2024
@osma osma self-assigned this Jan 23, 2024
@osma osma marked this pull request as draft January 23, 2024 14:14
@osma osma force-pushed the issue1574-alphabetical-index-diacritic-fix-skosmos-3 branch from cfe7b83 to bf68c52 Compare January 23, 2024 15:10
Copy link

sonarcloud bot commented Jan 23, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

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

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1e17ce9) 70.54% compared to head (bf68c52) 70.54%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1580   +/-   ##
=========================================
  Coverage     70.54%   70.54%           
  Complexity     1644     1644           
=========================================
  Files            32       32           
  Lines          4315     4315           
=========================================
  Hits           3044     3044           
  Misses         1271     1271           

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

@osma osma marked this pull request as ready for review January 23, 2024 15:25
@osma osma requested a review from joelit January 24, 2024 08:13
Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

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

Looks good. The chosen filter seems like a right call - the diacritics in initial letters seem to work, and it does not break special characters.

@osma osma merged commit 1e049d3 into main Jan 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR)
Development

Successfully merging this pull request may close these issues.

Alphabetic tab doesn't work with certain diacritic letters
2 participants