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

Bug #1185332 reported by Sylvain Viollon on 2013-05-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Low
Unassigned

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).

Sylvain Viollon (thefunny) wrote :

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

scoder (scoder) wrote :
Changed in lxml:
importance: Undecided → Low
status: New → Fix Committed
milestone: none → 3.3
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  Edit
Everyone can see this information.

Other bug subscribers