lxml.html.tostring fails to dump node tail in HTML

Bug #1185332 reported by Sylvain Viollon
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

If you parse (with lxml.html.fromstring) and dump (with lxml.html.tostring) the following html:

    <p><i>Really dude<i>\r\n</p>\r\n

You will obtain the following result:

    <p><i>Really dude<i>\r\n</p>&#13;\n

This happens because _writeTail defined in serializer.pxi fails to use tree.htmlNodeDumpFormatOutput if method is html like it is done by _writeNodeToBuffer.

Version of lxml used: 3.2.1 (latest at the moment).

Revision history for this message
Sylvain Viollon (thefunny) wrote :

I made a patch on github with a pull request: https://github.com/lxml/lxml/pull/121.

Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
importance: Undecided → Low
status: New → Fix Committed
milestone: none → 3.3
Revision history for this message
scoder (scoder) wrote :

Fixed in lxml 3.3.2.

Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.