about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-22 11:02:38 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-22 11:02:38 -0500
commita1d091b5524a4c6f8c8336307a398539d66f1db5 (patch)
tree94b538af2b3f467d6266a0680d79aec0e13fe6bd /config
parent61ac01a6bba2955bdca901f1162eb0010a422b67 (diff)
fix tag routing once and for all
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 0ef51d0fc..c86194109 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -78,7 +78,7 @@ Rails.application.routes.draw do
   get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
   get '/@:username/media', to: 'accounts#show', as: :short_account_media
   get '/@:username/reblogs', to: 'accounts#show', as: :short_account_reblogs
-  get '/@:username/tagged/:tag', to: 'accounts#show', as: :short_account_tag, constraints: { tag: /[\w:._·\-]+/ }
+  get '/@:username/tagged/:tag', to: 'accounts#show', as: :short_account_tag, constraints: { tag: /[^\/]+/ }
   get '/@:account_username/:id', to: 'statuses#show', as: :short_account_status
   get '/@:account_username/:id/embed', to: 'statuses#embed', as: :embed_short_account_status
 
@@ -86,7 +86,7 @@ Rails.application.routes.draw do
   post '/interact/:id', to: 'remote_interaction#create'
 
   get '/explore', to: 'directories#index', as: :explore
-  get '/explore/:id', to: 'directories#show', as: :explore_hashtag, constraints: { id: /[\w:._·\-]+/ }
+  get '/explore/:id', to: 'directories#show', as: :explore_hashtag, constraints: { id: /[^\/]+/ }
 
   namespace :settings do
     resource :profile, only: [:show, :update]
@@ -124,14 +124,14 @@ Rails.application.routes.draw do
     resource :migration, only: [:show, :update]
 
     resources :sessions, only: [:destroy]
-    resources :featured_tags, only: [:index, :create, :destroy], constraints: { id: /[\w:._·\-]+/ }
+    resources :featured_tags, only: [:index, :create, :destroy], constraints: { id: /[^\/]+/ }
   end
 
   resources :media, only: [:show] do
     get :player
   end
 
-  resources :tags,   only: [:show], constraints: { id: /[\w:._·\-]+/ }
+  resources :tags,   only: [:show], constraints: { id: /[^\/]+/ }
   resources :emojis, only: [:show]
   resources :invites, only: [:index, :create, :destroy]
   resources :filters, except: [:show]
@@ -293,7 +293,7 @@ Rails.application.routes.draw do
         resource :direct, only: :show, controller: :direct
         resource :home, only: :show, controller: :home
         resource :public, only: :show, controller: :public
-        resources :tag, only: :show, constraints: { id: /[\w:._·\-]+/ }
+        resources :tag, only: :show, constraints: { id: /[^\/]+/ }
         resources :list, only: :show
       end