chat: add safe hybrid Markdown editing with strict CSP
This commit is contained in:
1 parent
3ee2bef7ce
commit
f618d8bce9
43 files changed
+18079
-241
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user