diff --git a/cypress/integration/other/xss.spec.js b/cypress/integration/other/xss.spec.js index 7e286876b..603e75f5d 100644 --- a/cypress/integration/other/xss.spec.js +++ b/cypress/integration/other/xss.spec.js @@ -152,4 +152,15 @@ describe('XSS', () => { cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); + + it('should sanitize labels', () => { + const str = JSON.stringify({ + code: `erDiagram + "" ||--|| ENTITY2 : "" + `, + }); + imgSnapshotTest(utf8ToB64(str), {}, true); + cy.wait(1000); + cy.get('#the-malware').should('not.exist'); + }); });