Unable to view wiki pages in UI that contain empty spaces

Summary

Since GitLab version 15.5, it is no longer possible to preview the wiki pages that have a space ( ) in their names.

In GitLab version 15.4 such pages can be opened without issues. I suspect that this change might have introduced a regression.

Steps to reproduce

  1. Install GitLab 15.5+ or use GitLab.com
  2. Create a project and commit+push a wiki page that contains a space in its name;
  3. Try to open this new or link it from a different wiki page, and you will be prompted to Create a new page instead.

Example Project

This Home wiki page contains a link to a file that can't be displayed, but it exists in the wiki repository: https://gitlab.com/gitlab-gold/kategrechishkinatestgroup/wiki-test/-/wikis/Home

The project contains a file Analisi Statica.md which can be viewed if the same wiki project is pushed to a GitLab instance version 15.4 and lower.

What is the current bug behavior?

Navigating to a wiki pages that contain empty spaces gives "Create a new wiki page" screen instead of displaying a page.

image

What is the expected correct behavior?

The page should be displayed as it was the case in GitLab 15.4-

Output of checks

This bug happens on GitLab.com

Possible fixes