Skip to content

Commit 91067d2

Browse files
Potential fix for code scanning alert no. 66: 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 af97896 commit 91067d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

api/src/main/resources/templates/sso/ai/services.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,16 @@ <h6><i class="fas fa-cogs"></i> Affected Services</h6>
311311

312312
// Update the status text
313313
const formTextDiv = form.querySelector('.form-text');
314+
formTextDiv.textContent = '';
314315
if (integrationId) {
315-
formTextDiv.innerHTML = `
316-
Currently using integration ID: <span class="badge bg-info">${integrationId}</span>
317-
`;
316+
const textNode = document.createTextNode('Currently using integration ID: ');
317+
const badgeSpan = document.createElement('span');
318+
badgeSpan.className = 'badge bg-info';
319+
badgeSpan.textContent = integrationId;
320+
formTextDiv.appendChild(textNode);
321+
formTextDiv.appendChild(badgeSpan);
318322
} else {
319-
formTextDiv.innerHTML = `
320-
Currently auto-selecting most recent integration
321-
`;
323+
formTextDiv.textContent = 'Currently auto-selecting most recent integration';
322324
}
323325
} else {
324326
statusDiv.innerHTML = `

0 commit comments

Comments
 (0)