Docfile commited on
Commit
8df3575
·
verified ·
1 Parent(s): 472e0e7

Update templates/index.html

Browse files
Files changed (1) hide show
  1. 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.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
 
 
 
 
 
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', () => {