diff --git a/site/static/app.js b/site/static/app.js index c0447cd..08c2b63 100644 --- a/site/static/app.js +++ b/site/static/app.js @@ -203,7 +203,7 @@ async function runClassify() { if (!classifyDone) { clearInterval(timer); clearInterval(pollTimer); - btn.innerHTML = '✗ ' + e.message; + btn.innerHTML = '✗ ' + escHtml(e.message); btn.disabled = false; } } @@ -291,7 +291,7 @@ window.runCompareForGroup = async function(gi, btn) { state._activeCompare.timer = null; state._activeCompare.es = null; group.compare = null; - cmpBody.innerHTML += '
✗ ' + d.message + '
'; + cmpBody.innerHTML += '
✗ ' + escHtml(d.message) + '
'; btn.innerHTML = '✗'; btn.disabled = false; document.querySelectorAll('.cmp-btn').forEach(function(b) { b.disabled = false; }); }, @@ -340,7 +340,7 @@ document.getElementById('llmBtn').addEventListener('click', function() { lucide.createIcons(); }, onError: function(d) { - compareBody.innerHTML += '
✗ ' + d.message + '
'; + compareBody.innerHTML += '
✗ ' + escHtml(d.message) + '
'; btn.innerHTML = ' Общее сравнение'; btn.disabled = false; }, diff --git a/site/static/compare.js b/site/static/compare.js index c712478..23daa56 100644 --- a/site/static/compare.js +++ b/site/static/compare.js @@ -212,7 +212,7 @@ function startCompareSSE(url, container, statusEl, callbacks) { // ── extract_error / apply_error: показать ошибку ── else if (d.type === 'extract_error' || d.type === 'apply_error') { applyCompareEvent(sections, d); - container.innerHTML += '
✗ ' + d.filename + ': ' + d.error + '
'; + container.innerHTML += '
✗ ' + escHtml(d.filename) + ': ' + escHtml(d.error) + '
'; } // ── done: завершение ──