Commit cd63d0a5 authored by winniehell's avatar winniehell

Escape file extension when parsing search results (!5141)

parent 3c89a788
...@@ -8,6 +8,7 @@ v 8.10.0 (unreleased) ...@@ -8,6 +8,7 @@ v 8.10.0 (unreleased)
- Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Wrap code blocks on Activies and Todos page. !4783 (winniehell)
- Align flash messages with left side of page content !4959 (winniehell) - Align flash messages with left side of page content !4959 (winniehell)
- Display last commit of deleted branch in push events !4699 (winniehell) - Display last commit of deleted branch in push events !4699 (winniehell)
- Escape file extension when parsing search results !5141 (winniehell)
- Apply the trusted_proxies config to the rack request object for use with rack_attack - Apply the trusted_proxies config to the rack request object for use with rack_attack
- Add Sidekiq queue duration to transaction metrics. - Add Sidekiq queue duration to transaction metrics.
- Add a new column `artifacts_size` to table `ci_builds` !4964 - Add a new column `artifacts_size` to table `ci_builds` !4964
......
...@@ -911,7 +911,7 @@ class Repository ...@@ -911,7 +911,7 @@ class Repository
if line =~ /^.*:.*:\d+:/ if line =~ /^.*:.*:\d+:/
ref, filename, startline = line.split(':') ref, filename, startline = line.split(':')
startline = startline.to_i - index startline = startline.to_i - index
extname = File.extname(filename) extname = Regexp.escape(File.extname(filename))
basename = filename.sub(/#{extname}$/, '') basename = filename.sub(/#{extname}$/, '')
break break
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment