From e2dedcc5a4eb56c8b9fae68531b7a909db5aac8f Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 29 Dec 2015 17:12:26 -0800 Subject: [PATCH] Web: normalize whitespace in titles Sample link: http://googleblog.blogspot.com/2015/08/android-wear-now-works-with-iphones.html Before: 'Title: \nOfficial Google Blog: Android Wear now works with iPhones\n (at googleblog.blogspot.com)' After: Title: Official Google Blog: Android Wear now works with iPhones (at googleblog.blogspot.com) --- plugins/Web/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index 190af6c57..218874ea2 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -145,7 +145,7 @@ class Web(callbacks.PluginRegexp): return None parser.feed(text) parser.close() - title = ''.join(parser.data).strip() + title = utils.str.normalizeWhitespace(''.join(parser.data).strip()) if title: return (target, title) elif raiseErrors: