Fix — HTML entities rendering as literal text in JS textContent
textContent treats — as a plain string; replaced with innerHTML for static dash placeholders, and — JS escape where user input is concatenated. Also removed a dead textContent line in timeclock-kiosk.js that was immediately overwritten by innerHTML on the next line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -168,7 +168,7 @@
|
||||
|
||||
} catch (e) {
|
||||
document.getElementById('loadingState').classList.add('d-none');
|
||||
document.getElementById('errorMessage').textContent = 'Network error — please try again.';
|
||||
document.getElementById('errorMessage').innerHTML = 'Network error — please try again.';
|
||||
document.getElementById('errorState').classList.remove('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
} catch (e) {
|
||||
document.getElementById('loadingState').classList.add('d-none');
|
||||
document.getElementById('errorMessage').textContent = 'Network error — please try again.';
|
||||
document.getElementById('errorMessage').innerHTML = 'Network error — please try again.';
|
||||
document.getElementById('errorState').classList.remove('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user