Relax constraint on Wiki IDs, since subdirectories can contain spaces
If a subdirectory contains spaces, GitLab would be unable to generate the route in the sidebar, resulting in an Error 500. Closes #30357
This commit is contained in:
parent
9fc17f6f4a
commit
6811adafd5
2 changed files with 5 additions and 3 deletions
4
changelogs/unreleased/sh-relax-wiki-slug-constraint.yml
Normal file
4
changelogs/unreleased/sh-relax-wiki-slug-constraint.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Relax constraint on Wiki IDs, since subdirectories can contain spaces
|
||||
merge_request:
|
||||
author:
|
|
@ -1,5 +1,3 @@
|
|||
WIKI_SLUG_ID = { id: /\S+/ }.freeze unless defined? WIKI_SLUG_ID
|
||||
|
||||
scope(controller: :wikis) do
|
||||
scope(path: 'wikis', as: :wikis) do
|
||||
get :git_access
|
||||
|
@ -8,7 +6,7 @@ scope(controller: :wikis) do
|
|||
post '/', to: 'wikis#create'
|
||||
end
|
||||
|
||||
scope(path: 'wikis/*id', as: :wiki, constraints: WIKI_SLUG_ID, format: false) do
|
||||
scope(path: 'wikis/*id', as: :wiki, format: false) do
|
||||
get :edit
|
||||
get :history
|
||||
post :preview_markdown
|
||||
|
|
Loading…
Reference in a new issue