From db0ae850107809133e7c75dfff56087fdc3b6d09 Mon Sep 17 00:00:00 2001 From: brittonhayes Date: Wed, 16 Oct 2024 13:45:32 -0700 Subject: [PATCH] fix: unique substation editor separator --- cmd/substation/playground.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/substation/playground.go b/cmd/substation/playground.go index e2685356..8d80801b 100644 --- a/cmd/substation/playground.go +++ b/cmd/substation/playground.go @@ -82,7 +82,7 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { if sharedData != "" { decodedData, err := base64.URLEncoding.DecodeString(sharedData) if err == nil { - parts := strings.SplitN(string(decodedData), "|", 3) + parts := strings.SplitN(string(decodedData), "{substation-separator}", 3) if len(parts) == 3 { data.DefaultConfig = parts[0] data.DefaultInput = parts[1] @@ -225,7 +225,7 @@ func handleShare(w http.ResponseWriter, r *http.Request) { } // Combine and encode the data - combined := request.Config + "|" + request.Input + "|" + request.Output + combined := request.Config + "{substation-separator}" + request.Input + "{substation-separator}" + request.Output encoded := base64.URLEncoding.EncodeToString([]byte(combined)) // Create the shareable URL