From 7ecc048ae012a631bc3f0dcbd62f6190384ea0cd Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 16 Dec 2023 17:41:01 -0700 Subject: misc: go get -u; go mod tidy; go mod vendor --- vendor/github.com/PuerkitoBio/purell/purell.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vendor/github.com/PuerkitoBio/purell/purell.go') diff --git a/vendor/github.com/PuerkitoBio/purell/purell.go b/vendor/github.com/PuerkitoBio/purell/purell.go index 74c8272..3b086ce 100644 --- a/vendor/github.com/PuerkitoBio/purell/purell.go +++ b/vendor/github.com/PuerkitoBio/purell/purell.go @@ -86,6 +86,7 @@ var rxDWORDHost = regexp.MustCompile(`^(\d+)((?:\.+)?(?:\:\d*)?)$`) var rxOctalHost = regexp.MustCompile(`^(0\d*)\.(0\d*)\.(0\d*)\.(0\d*)((?:\.+)?(?:\:\d*)?)$`) var rxHexHost = regexp.MustCompile(`^0x([0-9A-Fa-f]+)((?:\.+)?(?:\:\d*)?)$`) var rxHostDots = regexp.MustCompile(`^(.+?)(:\d+)?$`) +var rxHostInteriorDots = regexp.MustCompile(`\.+`) var rxEmptyPort = regexp.MustCompile(`:+$`) // Map of flags to implementation function. @@ -368,6 +369,7 @@ func removeUnncessaryHostDots(u *url.URL) { u.Host += matches[2] } } + u.Host = rxHostInteriorDots.ReplaceAllString(u.Host, ".") } } -- cgit v1.2.3-54-g00ecf