From: Roland Häder <roland@mxchange.org>
Date: Tue, 3 Oct 2023 09:09:07 +0000 (+0200)
Subject: Continued:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=112ff965d31baa387b963c5141cb33202091dc47;p=fba.git

Continued:
- some people entered invalid domains names with two dots (foo..bar)
---

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