Large number of newlines produce broken HTML

11 views
Skip to first unread message

Wilfred Hughes

unread,
Jul 22, 2013, 6:16:10 PM7/22/13
to creole...@googlegroups.com
Consider the code:

first line\\
second line\\
third line\\
fourth line

This is producing a large number of closing br tags trailing at the end of the paragraph:

<p>first line<br>
second line<br>
third line<br>
fourth line</br></br></br></p>

Is this a bug, or is there a way I can switch off this behaviour?

Wilfred

Stephen Day

unread,
Jul 22, 2013, 6:25:58 PM7/22/13
to creole...@googlegroups.com
Can you post the code you are using to produce that? The is what I get:

<p>first line<br />second line<br />third line<br />fourth line</p>

Thanks,

Stephen

Wilfred Hughes

unread,
Jul 23, 2013, 6:23:27 PM7/23/13
to creole...@googlegroups.com
Ah, that will teach me to not give a full reproducible example. Turns out that passing the HTML through beautifulsoup4 was munging the br tags with its default HTML parser. User error, thanks for your help :)

Wilfred
Reply all
Reply to author
Forward
0 new messages