diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-15 19:04:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-15 19:04:36 +0000 |
commit | 3be2185683479f65e95cba89a419e30375a34df6 (patch) | |
tree | 07cc19764bd340ee9464c28031c07cf0d31cf8ae /app | |
parent | f694839c8242d37cde65d71813f114f80fe0353f (diff) | |
download | redmine-3be2185683479f65e95cba89a419e30375a34df6.tar.gz redmine-3be2185683479f65e95cba89a419e30375a34df6.zip |
Removes the UTF8 checkmark that prevents redirect from back_url.
git-svn-id: http://svn.redmine.org/redmine/trunk@15535 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c727d0be5..288f734f2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1109,6 +1109,11 @@ module ApplicationHelper url = params[:back_url] if url.nil? && referer = request.env['HTTP_REFERER'] url = CGI.unescape(referer.to_s) + # URLs that contains the utf8=[checkmark] parameter added by Rails are + # parsed as invalid by URI.parse so the redirect to the back URL would + # not be accepted (ApplicationController#validate_back_url would return + # false) + url.gsub!(/(\?|&)utf8=\u2713&?/, '\1') end url end |