diff --git a/cypress/integration/other/ghsa.spec.js b/cypress/integration/other/ghsa.spec.js index 5b168a8a8..4fadc7855 100644 --- a/cypress/integration/other/ghsa.spec.js +++ b/cypress/integration/other/ghsa.spec.js @@ -7,4 +7,10 @@ describe('CSS injections', () => { flowchart: { htmlLabels: false }, }); }); + it('should not allow adding styletags affecting the page', () => { + urlSnapshotTest('http://localhost:9000/ghsa3.html', { + logLevel: 1, + flowchart: { htmlLabels: false }, + }); + }); }); diff --git a/cypress/platform/ghsa1.html b/cypress/platform/ghsa1.html index c54358862..890a8e0dd 100644 --- a/cypress/platform/ghsa1.html +++ b/cypress/platform/ghsa1.html @@ -4,7 +4,7 @@
-flowchart TB;subgraph "number as labels";1;end; --
-flowchart TB;a[APA]; --
-graph TD - work --> sleep - sleep --> work - eat --> sleep - work --> eat --
-flowchart TD - work --> sleep - sleep --> work - eat --> sleep - work --> eat --
- graph TB - A - B - subgraph foo[Foo SubGraph] - C - D - end - subgraph bar[Bar SubGraph] - E - F - end - G - - A-->B - B-->C - C-->D - B-->D - D-->E - E-->A - E-->F - F-->D - F-->G - B-->G - G-->D - - style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred - style bar fill:#999,stroke-width:2px,stroke:#0F0,color:blue --
- graph TB -%%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% - A - B - subgraph foo[Foo SubGraph] - C - D - end - subgraph bar[Bar SubGraph] - E - F - end - G - - A-->B - B-->C - C-->D - B-->D - D-->E - E-->A - E-->F - F-->D - F-->G - B-->G - G-->D - - style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred - style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue --
+Security check+graph TD - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C --- graph TD -%%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C --- flowchart TD - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C --- flowchart TD -%%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C ---flowchart LR - a["Haiya"]---->b ---flowchart LR -%%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% - a["Haiya"]---->b --- flowchart TD - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C --- flowchart TD -%%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% - A[Christmas] ==> D - A[Christmas] -->|Get money| B(Go shopping) - A[Christmas] ==> C --- %%{init: { "logLevel": 1, "flowchart": {"htmlLabels":true }} }%% -classDiagram-v2 - Class01 <|-- AveryLongClass : Cool - <<interface>> Class01 - Class03 *-- Class04 - Class05 o-- Class06 - Class07 .. Class08 - Class09 --> C2 : Where am i? - Class09 --* C3 - Class09 --|> Class07 - Class12 <|.. Class08 - Class11 ..>Class12 - Class07 : equals() - Class07 : Object[] elementData - Class01 : size() - Class01 : int chimp - Class01 : int gorilla - Class01 : -int privateChimp - Class01 : +int publicGorilla - Class01 : #int protectedMarmoset - Class08 <--> C2: Cool label - class Class10 { - <<service>> - int id - test() - } ---classDiagram-v2 - Class01 <|-- AveryLongClass : Cool - <<interface>> Class01 - Class03 *-- Class04 - Class05 o-- Class06 - Class07 .. Class08 - Class09 --> C2 : Where am i? - Class09 --* C3 - Class09 --|> Class07 - Class12 <|.. Class08 - Class11 ..>Class12 - Class07 : equals() - Class07 : Object[] elementData - Class01 : size() - Class01 : int chimp - Class01 : int gorilla - Class01 : -int privateChimp - Class01 : +int publicGorilla - Class01 : #int protectedMarmoset - Class08 <--> C2: Cool label - class Class10 { - <<service>> - int id - test() - } ---flowchart BT - subgraph S1 - sub1 -->sub2 - end - subgraph S2 - sub4 - end - S1 --> S2 - sub1 --> sub4 --