Update templates/index.html
Browse files- templates/index.html +7 -1
templates/index.html
CHANGED
@@ -378,9 +378,15 @@
|
|
378 |
statusMessageElement.innerHTML = `<i class="${iconClass} mr-2" style="${iconColorStyle}"></i> <span class="status-text">${statusMsg}</span> ${taskInfoHtml}`;
|
379 |
}
|
380 |
|
|
|
381 |
function escapeHtml(unsafe) {
|
382 |
if (typeof unsafe !== 'string') return '';
|
383 |
-
return unsafe
|
|
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
|
386 |
copyButton.addEventListener('click', () => {
|
|
|
378 |
statusMessageElement.innerHTML = `<i class="${iconClass} mr-2" style="${iconColorStyle}"></i> <span class="status-text">${statusMsg}</span> ${taskInfoHtml}`;
|
379 |
}
|
380 |
|
381 |
+
// Fonction corrigée ici !
|
382 |
function escapeHtml(unsafe) {
|
383 |
if (typeof unsafe !== 'string') return '';
|
384 |
+
return unsafe
|
385 |
+
.replace(/&/g, "&")
|
386 |
+
.replace(/</g, "<")
|
387 |
+
.replace(/>/g, ">")
|
388 |
+
.replace(/"/g, """)
|
389 |
+
.replace(/'/g, "'");
|
390 |
}
|
391 |
|
392 |
copyButton.addEventListener('click', () => {
|