From 35a03cad57be37876c2023629abf27accd1ec4be Mon Sep 17 00:00:00 2001 From: Leonardo Date: Mon, 24 May 2010 16:31:12 +0200 Subject: [PATCH] Pulito un po' il codice. --- pywhois.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pywhois.py b/pywhois.py index 8914e47..053f57e 100644 --- a/pywhois.py +++ b/pywhois.py @@ -309,16 +309,22 @@ class WhoisHTTPRequestHandler(BaseHTTPRequestHandler): """ Format the raw output of the whois server """ + + # Sostituiamo le cose con i tag relativi + string = re.sub(r"\n", "
\n", string) + + # Creiamo effettivamente la pagina html = "\n" html += "\nWhois answer for %s\n" % request html += "\n" html += self.style_block html += "\n" html += "

Whois answer for %s

\n

" % request - html += re.sub(r"\n", "
\n", string) + html += string html += self.request_form html += "

\n" html += "" + return html def do_GET(self): -- 2.1.4