add TrimSpace to parseDomain
Jes Olson j3s@c3f.net
Mon, 20 Mar 2023 21:56:44 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
site.go
→
site.go
@@ -311,7 +311,8 @@ if err == nil {
return parsedURL.Hostname() } // do our best to trim it manually if url parsing fails - trimmedStr := strings.TrimPrefix(rawURL, "http://") + trimmedStr := strings.TrimSpace(rawURL) + trimmedStr = strings.TrimPrefix(rawURL, "http://") trimmedStr = strings.TrimPrefix(trimmedStr, "https://") return strings.Split(trimmedStr, "/")[0]