aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/PuerkitoBio/purell/purell.go
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2023-12-16 17:41:01 -0700
committerJordan <me@jordan.im>2023-12-16 17:41:01 -0700
commit7ecc048ae012a631bc3f0dcbd62f6190384ea0cd (patch)
treef8dd09feb67af740fb92d13c458e602f9bee8d45 /vendor/github.com/PuerkitoBio/purell/purell.go
parenta3dac1a28fdc9e42d85c4686858c64597cf1a15b (diff)
downloadkeep-7ecc048ae012a631bc3f0dcbd62f6190384ea0cd.tar.gz
keep-7ecc048ae012a631bc3f0dcbd62f6190384ea0cd.zip
misc: go get -u; go mod tidy; go mod vendorHEADmain
Diffstat (limited to 'vendor/github.com/PuerkitoBio/purell/purell.go')
-rw-r--r--vendor/github.com/PuerkitoBio/purell/purell.go2
1 files changed, 2 insertions, 0 deletions
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, ".")
}
}