From 5d8fa2e8d98f7e02bb3c0a6185d729f6e5c8d631 Mon Sep 17 00:00:00 2001 From: Mike Sawka Date: Thu, 26 Sep 2024 23:07:06 -0700 Subject: [PATCH] all data urls in bg. also fix setmeta to only split on the first equal sign (#889) --- cmd/wsh/cmd/wshcmd-setmeta.go | 2 +- frontend/app/app.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/wsh/cmd/wshcmd-setmeta.go b/cmd/wsh/cmd/wshcmd-setmeta.go index 252319abc..88ff7b451 100644 --- a/cmd/wsh/cmd/wshcmd-setmeta.go +++ b/cmd/wsh/cmd/wshcmd-setmeta.go @@ -28,7 +28,7 @@ func init() { func parseMetaSets(metaSets []string) (map[string]interface{}, error) { meta := make(map[string]interface{}) for _, metaSet := range metaSets { - fields := strings.Split(metaSet, "=") + fields := strings.SplitN(metaSet, "=", 2) if len(fields) != 2 { return nil, fmt.Errorf("invalid meta set: %q", metaSet) } diff --git a/frontend/app/app.tsx b/frontend/app/app.tsx index 9f5c5da12..f06190020 100644 --- a/frontend/app/app.tsx +++ b/frontend/app/app.tsx @@ -172,6 +172,9 @@ function processBackgroundUrls(cssText: string): string { hasJSUrl = true; return; } + if (originalUrl.startsWith("data:")) { + return; + } const newUrl = encodeFileURL(originalUrl); node.value = newUrl; },