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

Added url encoding to getLangUrl function #1542

Open
wants to merge 1 commit into
base: skosmos-2
Choose a base branch
from

Conversation

Vainonen
Copy link
Contributor

@Vainonen Vainonen commented Oct 31, 2023

Reasons for creating this PR

Fixes made in PR #1307 caused that changing UI language broke URLs containing colons from language change links in top bar.

Link to relevant issue(s), if any

Description of the changes in this PR

Now URLs in top bar are URL encoded (except equal sign and ampersand) and should contain only encoded colons that are not omitted.

Known problems or uncertainties in this PR

If URL contains equal signs and ampersands as values that should be escaped they are not URL encoded as should be.

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)

Copy link

sonarcloud bot commented Oct 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (99448fc) 70.08% compared to head (65e89cd) 70.26%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1542      +/-   ##
============================================
+ Coverage     70.08%   70.26%   +0.18%     
- Complexity     1658     1668      +10     
============================================
  Files            32       32              
  Lines          4272     4298      +26     
============================================
+ Hits           2994     3020      +26     
  Misses         1278     1278              
Files Coverage Δ
model/Request.php 79.20% <100.00%> (+0.85%) ⬆️

... and 1 file with indirect coverage changes

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

@osma osma added the Skosmos 2.X Relevant for Skosmos 2 label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Skosmos 2.X Relevant for Skosmos 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching language breaks ?uri= request parameter
3 participants