apostrophes break milestone titles
Summary
When you create a milestone in Gitlab CE that contains an apostrophe (') in the title, you can not select milestones in the "board" view. I'm not sure if it's possible to inject javascript this way...
Steps to reproduce
- Create a new milestone
- Enter this title: "Test' test"
- Click Issues -> Board
- Click Milestone dropdown
The milestone dropdown will load indefinitely, the console log will show an error "Syntax error, unrecognized expression:"
Expected behavior
I expect to see the milestone dropdown with my milestones
Actual behavior
The milestone dropdown loads indefinitely
Relevant logs and/or screenshots
Error: Syntax error, unrecognized expression: input[name='milestone_title'][value='Test' test']
Output of checks
Results of GitLab application Check
$ sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version >= 3.6.6 ? ... OK (3.6.6)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/2 ... ok
4/3 ... ok
4/4 ... ok
4/5 ... ok
4/6 ... ok
4/7 ... ok
20/8 ... ok
20/9 ... ok
4/10 ... ok
4/11 ... ok
4/12 ... ok
4/13 ... ok
4/14 ... ok
4/15 ... repository is empty
4/16 ... ok
4/17 ... repository is empty
13/18 ... ok
13/20 ... ok
4/21 ... ok
4/22 ... ok
9/23 ... repository is empty
9/24 ... ok
9/25 ... ok
11/27 ... ok
4/28 ... ok
20/29 ... ok
20/32 ... ok
27/33 ... ok
8/34 ... ok
8/35 ... ok
8/36 ... ok
21/37 ... ok
4/38 ... ok
4/40 ... ok
13/41 ... ok
20/42 ... ok
20/43 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain
<redacted LDAP info>
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
4/2 ... yes
4/3 ... yes
4/4 ... yes
4/5 ... yes
4/6 ... yes
4/7 ... yes
20/8 ... yes
20/9 ... yes
4/10 ... yes
4/11 ... yes
4/12 ... yes
4/13 ... yes
4/14 ... yes
4/15 ... yes
4/16 ... yes
4/17 ... yes
13/18 ... yes
13/20 ... yes
4/21 ... yes
4/22 ... yes
9/23 ... yes
9/24 ... yes
9/25 ... yes
11/27 ... yes
4/28 ... yes
20/29 ... yes
20/32 ... yes
27/33 ... yes
8/34 ... yes
8/35 ... yes
8/36 ... yes
21/37 ... yes
4/38 ... yes
4/40 ... yes
13/41 ... yes
20/42 ... yes
20/43 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 27
Checking GitLab ... Finished
Results of GitLab environment info
$ sudo gitlab-rake gitlab:env:info
System information
System: Debian 8.6
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.5
Rake Version: 10.5.0
Sidekiq Version:4.2.1
GitLab information
Version: 8.13.3
Revision: 8d79ab3
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://code.<company>.net
HTTP Clone URL: https://code.<company>.net/some-group/some-project.git
SSH Clone URL: git@code.<company>.net:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 3.6.6
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Possible fixes
This occurs in the minimized JS: application-....js line 1 column 29652