diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-08-05 02:05:58 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-08-05 17:19:01 -0500 |
commit | bb02065a5dfbda79874ee41cb128e63b97b50a37 (patch) | |
tree | 593651cf190fdf0fee9bb8426cc1d4a20d18e57c | |
parent | 1983eb6c305eba1bc2c7cd72d1e5f9a9017dfa18 (diff) | |
download | gitlab-ce-bb02065a5dfbda79874ee41cb128e63b97b50a37.tar.gz |
Prevent setting HTML directly from the JS
-rw-r--r-- | app/assets/javascripts/protected_branch_dropdown.js.es6 | 4 | ||||
-rw-r--r-- | app/views/projects/protected_branches/_dropdown.html.haml | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/protected_branch_dropdown.js.es6 b/app/assets/javascripts/protected_branch_dropdown.js.es6 index 66b1217473b..6738dc8862d 100644 --- a/app/assets/javascripts/protected_branch_dropdown.js.es6 +++ b/app/assets/javascripts/protected_branch_dropdown.js.es6 @@ -66,8 +66,8 @@ class ProtectedBranchDropdown { if (branchName) { this.$dropdownContainer - .find('.create-new-protected-branch') - .html(`Create wildcard <code>${branchName}</code>`); + .find('.create-new-protected-branch code') + .text(branchName); } this.$dropdownFooter.toggleClass('hidden', !branchName); diff --git a/app/views/projects/protected_branches/_dropdown.html.haml b/app/views/projects/protected_branches/_dropdown.html.haml index 1281e6664dd..a9e27df5a87 100644 --- a/app/views/projects/protected_branches/_dropdown.html.haml +++ b/app/views/projects/protected_branches/_dropdown.html.haml @@ -11,4 +11,5 @@ %ul.dropdown-footer-list %li = link_to '#', title: "New Protected Branch", class: "create-new-protected-branch" do - Create new + Create wildcard + %code |