Skip to content

Commit

Permalink
fix: unique substation editor separator
Browse files Browse the repository at this point in the history
  • Loading branch information
brittonhayes committed Oct 16, 2024
1 parent 5e3f617 commit db0ae85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/substation/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db0ae85

Please sign in to comment.