From 5f570ac9b8a937f7cfc1cae463e49c0076b0d81b Mon Sep 17 00:00:00 2001 From: Paal Braathen Date: Wed, 20 Mar 2013 10:02:20 +0100 Subject: [PATCH] Remove excess whitespace from html title --- snurr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snurr.py b/snurr.py index 530cdc8..e6b2d37 100755 --- a/snurr.py +++ b/snurr.py @@ -204,7 +204,7 @@ class IRCActions(): tree = lxml.html.fromstring(partialhtml) title = tree.find(".//title") if title is not None and title.text is not None: - reply += "[%s]" % title.text.strip() + reply += "[%s]" % re.sub(r'\s+', ' ', title.text.strip()) # DEBUG if title is None: reply += ""