diff options
-rw-r--r-- | app/controllers/help_controller.rb | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 10094d86dfb..35ece5b270b 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -4,7 +4,7 @@ class HelpController < ApplicationController def show category = clean_path_info(path_params[:category]) - file = clean_path_info(path_params[:file]) + file = path_params[:file] respond_to do |format| format.any(:markdown, :md, :html) do diff --git a/config/routes.rb b/config/routes.rb index 8dbe6d80ab7..744a99feded 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -39,7 +39,7 @@ Gitlab::Application.routes.draw do # Help get 'help' => 'help#index' - get 'help/:category/:file' => 'help#show', as: :help_page, constraints: { category: /[^\.]+/, file: /[^\.]+/ } + get 'help/:category/:file' => 'help#show', as: :help_page, constraints: { category: /.*/, file: /[^\/\.]+/ } get 'help/shortcuts' get 'help/ui' => 'help#ui' diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index b1225f101b7..e219a57c29e 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -65,7 +65,7 @@ describe SnippetsController, "routing" do end # help GET /help(.:format) help#index -# help_page GET /help/:category/:file(.:format) help#show {:category=>/[^\.]+/, :file=>/[^\.]+/} +# help_page GET /help/:category/:file(.:format) help#show {:category=>/.*/, :file=>/[^\/\.]+/} # help_shortcuts GET /help/shortcuts(.:format) help#shortcuts # help_ui GET /help/ui(.:format) help#ui describe HelpController, "routing" do |