Remove excess whitespace from html title

This commit is contained in:
Paal Braathen committed 2013-03-20 10:02:20 +01:00
1 parent 21e8330827
commit 5f570ac9b8
1 file changed
+1 -1
+1 -1
View File
@@ -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 += "<title is none>"