From 34879219dabe3a9a813a3b30e4391d35e0bc8688 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 29 Jul 2013 18:24:17 +0100 Subject: Handle the case of a name that hits the character limits and has been suffixed with a number. --- app/controllers/user_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 1bf5a5316..175425280 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -19,8 +19,8 @@ class UserController < ApplicationController # Show page about a user def show long_cache - if MySociety::Format.simplify_url_part(params[:url_name], 'user', 32) != params[:url_name] - redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'user', 32), :status => :moved_permanently + if MySociety::Format.simplify_url_part(params[:url_name], 'user') != params[:url_name] + redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'user'), :status => :moved_permanently return end if params[:view].nil? -- cgit v1.2.3