From 652bfd4dcc8ef5ea6a56c0920b18f8b3c5c2af0f Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 25 May 2010 10:24:53 +0200 Subject: [PATCH] Aggiunto supporto per "<" e ">" nelle stringhe da stampare. --- pywhois.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pywhois.py b/pywhois.py index fe93cc1..1828997 100644 --- a/pywhois.py +++ b/pywhois.py @@ -314,11 +314,16 @@ class WhoisHTTPRequestHandler(BaseHTTPRequestHandler): Format the raw output of the whois server """ + # Le cose che non sono tag si devono vedere... + string = re.sub(r"<", "<", string) + string = re.sub(r">", ">", string) + + # Sostituiamo le cose con i tag relativi for match in re.findall(r"::(.*)\n", string): string = string.replace(match, "%s" % match) string = re.sub(r"\n", "
\n", string) - + # Creiamo effettivamente la pagina html = "\n" html += "\nWhois answer for %s\n" % request -- 2.1.4