From eabc300ff88853dfb568a651275b83cf553776f6 Mon Sep 17 00:00:00 2001 From: yangwenmai Date: Mon, 30 Nov 2020 11:14:05 +0800 Subject: [PATCH 1/2] all: escapse percent in code --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c64e5b8..cd84b85 100644 --- a/main.go +++ b/main.go @@ -130,7 +130,7 @@ func render(imgfile, code string) error { values.Set(k, v) } codeparam := url.Values{} - codeparam.Set("code", code) + codeparam.Set("code", url.PathEscape(code)) ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() From 56dbaa464e0fd83af377f4a1587ed7df20bbc53d Mon Sep 17 00:00:00 2001 From: yangwenmai Date: Mon, 30 Nov 2020 11:14:17 +0800 Subject: [PATCH 2/2] config: update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7023a7b..2c8c1e5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ # vendor/ data/code/*.go data/images/*.png -code2img \ No newline at end of file +code2img +.idea