Wiki New Page form creating invalid path/slug

Summary

The New Page form passes "special" characters from name into automatically generated slug/path of the wiki page. This leads to funky slugs/paths and also broken wiki sidebar, which then does not show the wiki pages any more and it says There are no pages in this wiki yet. From observation ( and ) do the problem with wiki sidebar, but other symbols could be problematic as well.

This behaviour is far different from how this transformation works for projects or groups, where the rules for path/slug are strict. The behaviour from projects and groups would be preferred as safe option.

Steps to reproduce

  1. Create wiki for a project
  2. (optional) Create a basic home page to see that the sidebar is working just fine and shows the wiki pages correctly
  3. Create a new page which name includes ) or (

Example Project

https://gitlab.com/krizpavel/test-special-characters-in-wiki-pages-paths/-/wikis/home

What is the current bug behavior?

New Page form allows for existence of funky paths/slugs which is not only optimal but also breaks the wiki.

What is the expected correct behavior?

Something like the group/project name into path/slug transformation or at least that the wiki handles the possible slugs/paths.