diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 572b3ebe0..e89ecb387 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -18,7 +18,7 @@ class PeopleController < ApplicationController params[:q] ||= params[:term] || '' if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1 - redirect_to tag_path(:name => params[:q].gsub("#", "")) + redirect_to tag_path(:name => params[:q].gsub(/[#\.]/, '')) return end diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index 09a670712..598b0e63d 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -72,6 +72,11 @@ describe PeopleController do get :index, :q => '#babies' response.should redirect_to('/tags/babies') end + + it 'goes to a tag page if you search for a hash with dots' do + get :index, :q => '#babi.es' + response.should redirect_to('/tags/babies') + end end describe '#tag_index' do