From b724e4aeca27491142ca584f17a251a13f4e8aa4 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 2 Apr 2022 17:43:20 -0700 Subject: [PATCH] fix: target sanitation --- util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.go b/util.go index 3694820..a908789 100644 --- a/util.go +++ b/util.go @@ -27,7 +27,8 @@ func processTarget(source string) string { res, _ = url.PathUnescape(res) res = strings.Split(res, "#")[0] res = strings.TrimSpace(res) - return UnicodeSanitize(res) + res = UnicodeSanitize(res) + return strings.ReplaceAll(url.PathEscape(res), "%2F", "/") } func processSource(source string) string {