diff --git a/e2etests/testdata/regression/dagre_id_with_newline/dagre/board.exp.json b/e2etests/testdata/regression/dagre_id_with_newline/dagre/board.exp.json
new file mode 100644
index 000000000..4366386d6
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_id_with_newline/dagre/board.exp.json
@@ -0,0 +1,45 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "\"ninety\\nnine\"",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 151,
+ "height": 142,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "ninety\nnine",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 51,
+ "labelHeight": 42,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": []
+}
diff --git a/e2etests/testdata/regression/dagre_id_with_newline/dagre/sketch.exp.svg b/e2etests/testdata/regression/dagre_id_with_newline/dagre/sketch.exp.svg
new file mode 100644
index 000000000..c9c9cf7da
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_id_with_newline/dagre/sketch.exp.svg
@@ -0,0 +1,24 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/dagre_id_with_newline/elk/board.exp.json b/e2etests/testdata/regression/dagre_id_with_newline/elk/board.exp.json
new file mode 100644
index 000000000..560f31355
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_id_with_newline/elk/board.exp.json
@@ -0,0 +1,45 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "\"ninety\\nnine\"",
+ "type": "",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 151,
+ "height": 142,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "ninety\nnine",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 51,
+ "labelHeight": 42,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": []
+}
diff --git a/e2etests/testdata/regression/dagre_id_with_newline/elk/sketch.exp.svg b/e2etests/testdata/regression/dagre_id_with_newline/elk/sketch.exp.svg
new file mode 100644
index 000000000..c967c4201
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_id_with_newline/elk/sketch.exp.svg
@@ -0,0 +1,24 @@
+
+
\ No newline at end of file