From 7d4c4977e1793e2d6aed397bea5b523c203db321 Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Fri, 26 Dec 2025 19:23:55 +0100 Subject: [PATCH] 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> --- phpmyfaq/assets/src/configuration/update.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpmyfaq/assets/src/configuration/update.ts b/phpmyfaq/assets/src/configuration/update.ts index 59844fcebc..d29bcda76d 100644 --- a/phpmyfaq/assets/src/configuration/update.ts +++ b/phpmyfaq/assets/src/configuration/update.ts @@ -20,7 +20,11 @@ export const handleUpdateNextStepButton = (): void => { if (nextStepButton && nextStep) { nextStepButton.addEventListener('click', (event: MouseEvent): void => { event.preventDefault(); - window.location.replace(`?step=${nextStep.value}`); + const stepValue = parseInt(nextStep.value, 10); + if (Number.isNaN(stepValue) || stepValue < 1) { + return; + } + window.location.replace(`?step=${stepValue}`); }); } };