From 139a3a1789a8d3cd3c4afcd22baa3b1a1f3c6afa Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Tue, 30 Jul 2024 15:23:13 +0200 Subject: [PATCH] fix: In r/demo/profile fieldHandler, use url.QueryEscape(value) to make the link Signed-off-by: Jeff Thompson --- examples/gno.land/r/demo/profile/render.gno | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/gno.land/r/demo/profile/render.gno b/examples/gno.land/r/demo/profile/render.gno index 4ff295e65eb..79d1078a997 100644 --- a/examples/gno.land/r/demo/profile/render.gno +++ b/examples/gno.land/r/demo/profile/render.gno @@ -2,6 +2,7 @@ package profile import ( "bytes" + "net/url" "std" "gno.land/p/demo/mux" @@ -83,7 +84,7 @@ func fieldHandler(res *mux.ResponseWriter, req *mux.Request) { if _, ok := stringFields[field]; ok { value = ufmt.Sprintf("%s", GetStringField(address, field, "n/a")) - editLink = ufmt.Sprintf(SetStringFieldURL+"&addr=%s&value=%s", field, addr, value) + editLink = ufmt.Sprintf(SetStringFieldURL+"&addr=%s&value=%s", field, addr, url.QueryEscape(value)) } else if _, ok := intFields[field]; ok { value = ufmt.Sprintf("%d", GetIntField(address, field, 0)) editLink = ufmt.Sprintf(SetIntFieldURL+"&addr=%s&value=%s", field, addr, value)