diff options
Diffstat (limited to 'app/assets/javascripts/repository/commits_service.js')
-rw-r--r-- | app/assets/javascripts/repository/commits_service.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/repository/commits_service.js b/app/assets/javascripts/repository/commits_service.js index 1e0de045d39..44113788716 100644 --- a/app/assets/javascripts/repository/commits_service.js +++ b/app/assets/javascripts/repository/commits_service.js @@ -31,13 +31,14 @@ const fetchData = (projectPath, path, ref, offset, refType) => { fetchedBatches.push(offset); + const encodePathFunc = gon.features.encodingLogsTree ? encodeURI : encodeURIComponent; const url = joinPaths( gon.relative_url_root || '/', projectPath, '/-/refs/', - encodeURIComponent(ref), + encodePathFunc(ref), '/logs_tree/', - encodeURIComponent(removeLeadingSlash(path)), + encodePathFunc(removeLeadingSlash(path)), ); return axios |