Skip to content
Snippets Groups Projects
Commit ecbe119a authored by Stan Hu's avatar Stan Hu
Browse files

Fix "Network" and "Graphs" pages for branches with encoded slashes

Closes #1359
parent 208e07fe
No related branches found
No related tags found
No related merge requests found
Please view this file on the master branch, on stable branches it's out of date.
 
v 7.14.0 (unreleased)
- Fix "Network" and "Graphs" pages for branches with encoded slashes (Stan Hu)
- Fix errors deleting and creating branches with encoded slashes (Stan Hu)
- Fix multi-line syntax highlighting (Stan Hu)
- Fix network graph when branch name has single quotes (Stan Hu)
Loading
Loading
Loading
Loading
@@ -94,7 +94,7 @@ module ExtractsPath
@options = params.select {|key, value| allowed_options.include?(key) && !value.blank? }
@options = HashWithIndifferentAccess.new(@options)
 
@id = get_id
@id = Addressable::URI.unescape(get_id)
@ref, @path = extract_ref(@id)
@repo = @project.repository
if @options[:extended_sha1].blank?
Loading
Loading
Loading
Loading
@@ -29,6 +29,16 @@ describe ExtractsPath do
assign_ref_vars
expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb")
end
context 'escaped sequences in ref' do
let(:ref) { "improve%2Fawesome" }
it "id should have no escape sequences" do
assign_ref_vars
expect(@ref).to eq('improve/awesome')
expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb")
end
end
end
 
describe '#extract_ref' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment