From 605cd60c6f936381d25be0753ce0e3e690df7118 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 2 Apr 2022 12:51:56 -0700 Subject: [PATCH] more robust escaping for targets --- util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util.go b/util.go index 2dc42e1..3694820 100644 --- a/util.go +++ b/util.go @@ -24,6 +24,7 @@ func processTarget(source string) string { return strings.TrimSuffix(source, ".md") } res := "/" + strings.TrimSuffix(strings.TrimSuffix(source, ".html"), ".md") + res, _ = url.PathUnescape(res) res = strings.Split(res, "#")[0] res = strings.TrimSpace(res) return UnicodeSanitize(res)