mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Web: normalize whitespace in titles
Sample link: http://googleblog.blogspot.com/2015/08/android-wear-now-works-with-iphones.html Before: <bot> 'Title: \nOfficial Google Blog: Android Wear now works with iPhones\n (at googleblog.blogspot.com)' After: <bot> Title: Official Google Blog: Android Wear now works with iPhones (at googleblog.blogspot.com)
This commit is contained in:
parent
4b1c766b42
commit
e2dedcc5a4
@ -145,7 +145,7 @@ class Web(callbacks.PluginRegexp):
|
|||||||
return None
|
return None
|
||||||
parser.feed(text)
|
parser.feed(text)
|
||||||
parser.close()
|
parser.close()
|
||||||
title = ''.join(parser.data).strip()
|
title = utils.str.normalizeWhitespace(''.join(parser.data).strip())
|
||||||
if title:
|
if title:
|
||||||
return (target, title)
|
return (target, title)
|
||||||
elif raiseErrors:
|
elif raiseErrors:
|
||||||
|
Loading…
Reference in New Issue
Block a user