Wikifetch: also strip newlines from regular paragraphs

Example of problem article: https://en.wikipedia.org/wiki/2BOT_Physical_Modeling_Technologies
This commit is contained in:
James Lu 2015-10-25 17:06:06 -07:00
parent af6a4d5314
commit c50c50b1cb

View File

@ -198,6 +198,8 @@ class Wikifetch(callbacks.Plugin):
b_tag.text = "%s" % (b_tag.text or '')
p = p.text_content()
p = p.replace('', '\x02')
# Get rid of newlines, etc., that can corrupt the output.
p = utils.str.normalizeWhitespace(p)
p = p.strip()
if sys.version_info[0] < 3:
if isinstance(p, unicode):