#1607 Using correct config when to decide about sanitizing text

This commit is contained in:
Knut Sveidqvist
2020-08-23 20:02:51 +02:00
parent dac7b1c5b1
commit 0cbd002667
12 changed files with 311 additions and 50 deletions

View File

@@ -64,4 +64,21 @@ describe('Flowchart v2', () => {
{ flowchart: { diagramPadding: 0 } }
);
});
it('36: should render escaped without html labels', () => {
imgSnapshotTest(
`flowchart TD
a["<strong>Haiya</strong>"]---->b
`,
{htmlLabels: false, flowchart: {htmlLabels: false}}
);
});
it('37: should render non-escaped with html labels', () => {
imgSnapshotTest(
`flowchart TD
a["<strong>Haiya</strong>"]===>b
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
});