From 0314a74eab1007d9089e786aaa081a41f4778af8 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 14 Jan 2023 14:20:08 -0800 Subject: [PATCH 1/3] unescape img hrefs --- .../query_param_escape/dagre/board.exp.json | 51 +++++++++++++++++++ .../query_param_escape/dagre/sketch.exp.svg | 6 +-- .../query_param_escape/elk/board.exp.json | 51 +++++++++++++++++++ .../query_param_escape/elk/sketch.exp.svg | 6 +-- lib/imgbundler/imgbundler.go | 9 ++-- 5 files changed, 113 insertions(+), 10 deletions(-) diff --git a/e2etests/testdata/regression/query_param_escape/dagre/board.exp.json b/e2etests/testdata/regression/query_param_escape/dagre/board.exp.json index fb0febb97..cd9d2e542 100644 --- a/e2etests/testdata/regression/query_param_escape/dagre/board.exp.json +++ b/e2etests/testdata/regression/query_param_escape/dagre/board.exp.json @@ -52,6 +52,57 @@ "labelPosition": "INSIDE_TOP_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "with ampersand", + "type": "", + "pos": { + "x": 250, + "y": 0 + }, + "width": 220, + "height": 152, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#F7F8FE", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": { + "Scheme": "https", + "Opaque": "", + "User": null, + "Host": "icons.terrastruct.com", + "Path": "/aws/Networking & Content Delivery/Amazon-API-Gateway_Endpoint_light-bg.svg", + "RawPath": "", + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "with ampersand", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 120, + "labelHeight": 26, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [] diff --git a/e2etests/testdata/regression/query_param_escape/dagre/sketch.exp.svg b/e2etests/testdata/regression/query_param_escape/dagre/sketch.exp.svg index 70f3449d4..8d42301fe 100644 --- a/e2etests/testdata/regression/query_param_escape/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/query_param_escape/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="394" height="356" viewBox="-102 -102 394 356">