chat: add safe hybrid Markdown editing with strict CSP
ci / linux-arm64-cross (push) Successful in 3m22s
ci / linux-x64 (push) Successful in 3m32s

This commit is contained in:
omar committed 2026-11-02 11:32:31 +03:00
1 parent 3ee2bef7ce
commit f618d8bce9
43 files changed
+18079 -241

No files matched your search

+3 -1
View File
@@ -77,7 +77,9 @@ try {
const historyButtons = [...document.querySelectorAll('.chat-history-controls button')].filter((n) => n.checkVisibility()).map((n) => n.textContent);
S.viewId = b.id; chat.onViewChanged(); const bText = document.querySelector('#chat-log').textContent;
chat.openPrivate(b, 2); b.snap.clients[1] = { id: 2, uid: 'ReusedIdDifferentPeer=', nickname: 'Different' }; chat.onSnapshot(b);
const reusedDisabled = document.querySelector('#chat-input').disabled;
// The real editable surface refuses input: adapter state, contentEditable and the accessible state agree.
const input = document.querySelector('#chat-input');
const reusedDisabled = chat.composerEditor().disabled && input.contentEditable === 'false' && input.getAttribute('aria-disabled') === 'true';
return { rows, aIsolated: !aText.includes('B isolated'), bIsolated: !bText.includes('A 509'), unreadB, reusedDisabled, systemRow, historyButtons };
});
assert.ok(integrated.rows <= 500); assert.equal(integrated.aIsolated, true); assert.equal(integrated.bIsolated, true); assert.equal(integrated.unreadB, 1); assert.equal(integrated.reusedDisabled, true);