diff options
author | Stan Hu <stanhu@gmail.com> | 2015-04-26 23:42:29 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-04-30 12:44:46 -0700 |
commit | ee92dd1683febd03e1d7ade40449ba114a67e1f5 (patch) | |
tree | 9dff492ff6d9659f9a883a20b9adfbe29180f059 /app/controllers | |
parent | 39a55bdf1a1613f362bcd7da444b291210454160 (diff) | |
download | gitlab-ce-ee92dd1683febd03e1d7ade40449ba114a67e1f5.tar.gz |
Unescape branch names in compare commit
Closes #1399
Closes https://github.com/gitlabhq/gitlabhq/issues/9105
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/compare_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 03e6c381275..7c20b81c0b1 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -1,3 +1,5 @@ +require 'addressable/uri' + class Projects::CompareController < Projects::ApplicationController # Authorize before_action :require_non_empty_project @@ -7,8 +9,8 @@ class Projects::CompareController < Projects::ApplicationController end def show - base_ref = params[:from] - head_ref = params[:to] + base_ref = Addressable::URI.unescape(params[:from]) + head_ref = Addressable::URI.unescape(params[:to]) compare_result = CompareService.new.execute( current_user, |