From 112ff965d31baa387b963c5141cb33202091dc47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 Oct 2023 11:09:07 +0200 Subject: [PATCH] Continued: - some people entered invalid domains names with two dots (foo..bar) --- fba/helpers/tidyup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fba/helpers/tidyup.py b/fba/helpers/tidyup.py index 68abb8d..acd8bc6 100644 --- a/fba/helpers/tidyup.py +++ b/fba/helpers/tidyup.py @@ -40,7 +40,7 @@ def domain(string: str) -> str: raise ValueError("Parameter string is empty") # All lower-case and strip spaces out + last dot - string = string.lower().strip().rstrip(".") + string = string.lower().strip().rstrip(".").replace("..", ".") logger.debug("string='%s' - #1", string) # No port number -- 2.39.5