Remove excess whitespace from html title
This commit is contained in:
1 parent
21e8330827
commit
5f570ac9b8
1 file changed
+1
-1
@@ -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>"
|
||||
|
||||
Reference in new issue
Block a user