Special characters in filename incorrectly parsed with search results
Summary
When there are special characters in a filename and you perform a search, the link to the filename is incorrectly (both shown and the lik itself).
Steps to reproduce
We have (puppet)files with the name: project::function.yaml When you create those files and search for it, they show up incorrectly in the results.
Example Project
Example files: https://gitlab.com/hp197/spec-character-bug
Search results: https://gitlab.com/search?utf8=%E2%9C%93&search=test&group_id=&project_id=4649936&search_code=true&repository_ref=master
What is the current bug behavior?
Everything on and after the special character is stripped, both in the text and in the link itself. Due to the link being incorrect as well, it will point to a 404 page.
What is the expected correct behavior?
Both text and link should be correctly displayed (and the link being correctly urlencoded).
Relevant logs and/or screenshots
Files who are incorrectly parsed:
- Note the destination of the link is also incorrectly: https://gitlab/devops/puppet/blob/development/hieradata/roles/elasticstack
Output of checks
This bug happens both on GitLab.com and on private installations (CE)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.9 Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.1.0 Redis Version: 3.2.5 Git Version: 2.13.6 Sidekiq Version:5.0.4 Go Version: unknownGitLab information Version: 10.1.3 Revision: e6142bc Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://gitlab HTTP Clone URL: https://gitlab/some-group/some-project.git SSH Clone URL: git@gitlab:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.9.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git