Skip to content

Commit 02d737b

Browse files
Potential fix for code scanning alert no. 67: DOM text reinterpreted as HTML
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Marc <[email protected]>
1 parent 91067d2 commit 02d737b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

api/src/main/resources/templates/sso/automation/suggestions_list.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ <h6>Assign to New Systems</h6>
11841184
container.empty();
11851185

11861186
if (response.status === 'success' && response.assignments && response.assignments.length > 0) {
1187-
var html = '<ul class="list-group">';
1187+
var list = $('<ul></ul>').addClass('list-group');
11881188
response.assignments.forEach(function(assignment) {
11891189
html += '<li class="list-group-item d-flex justify-content-between align-items-center bg-secondary">';
11901190
html += '<div>';
@@ -1196,8 +1196,7 @@ <h6>Assign to New Systems</h6>
11961196
html += '</button>';
11971197
html += '</li>';
11981198
});
1199-
html += '</ul>';
1200-
container.html(html);
1199+
container.append(list);
12011200
} else {
12021201
container.html('<p class="text-muted">No systems assigned yet.</p>');
12031202
}

0 commit comments

Comments
 (0)