After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567047 - HTML parser adds whitespace
HTML parser adds whitespace
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: htmlparser
2.6.31
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-08 17:39 UTC by Ian Bicking
Modified: 2021-07-05 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ian Bicking 2009-01-08 17:39:00 UTC
Please describe the problem:
The HTML parser seems to add whitespace around block-level elements.  For instance:

<ul><li>item1</li><li>item2</li></ul>

When using xmllint -html you get:

<ul>
<li>item1</li>
<li>item2</li>
</ul>

This appears safe, but with some CSS rules this whitespace addition will change rendering.  Specifically if you use the CSS:

li {display: inline}

The first case renders in a browser as "item1item2" and the second case "item1 item2"

Steps to reproduce:
Parse a document with <li> elements with no whitespace between the elements.  The parse will include inserted whitespace.

Actual results:


Expected results:
There shouldn't be any included whitespace; the parse shouldn't change the document.

Does this happen every time?
Yes.

Other information:
Comment 1 GNOME Infrastructure Team 2021-07-05 13:24:29 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.