Skip to content

Commit 8538c0b

Browse files
Potential fix for code scanning alert no. 21: DOM text reinterpreted as HTML
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 0e80970 commit 8538c0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

phpmyfaq/assets/src/configuration/update.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ export const handleUpdateNextStepButton = (): void => {
2020
if (nextStepButton && nextStep) {
2121
nextStepButton.addEventListener('click', (event: MouseEvent): void => {
2222
event.preventDefault();
23-
window.location.replace(`?step=${nextStep.value}`);
23+
const stepValue = parseInt(nextStep.value, 10);
24+
if (Number.isNaN(stepValue) || stepValue < 1) {
25+
return;
26+
}
27+
window.location.replace(`?step=${stepValue}`);
2428
});
2529
}
2630
};

0 commit comments

Comments
 (0)