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 334669 - Broken XML generated by HTML parser
Broken XML generated by HTML parser
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.22
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-15 17:03 UTC by Jerome Pesenti
Modified: 2006-10-13 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jerome Pesenti 2006-03-15 17:03:32 UTC
Please describe the problem:
An empty tag is generated when parsing HTML with code like

<a://b/>

Steps to reproduce:
<html>
bad tag <http://bla.com/>
</html>
[pesenti@dev articles]$ ~/stable/libxml/bin/xmllint --html /tmp/o.html
/tmp/o.html:2: HTML parser error : error parsing attribute name
bad tag <http://bla.com/>
              ^
/tmp/o.html:2: warning: Namespace prefix http is not defined
bad tag <http://bla.com/>
                       ^
/tmp/o.html:2: HTML parser error : Tag http: invalid
bad tag <http://bla.com/>
                       ^
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>
bad tag <></></p></body></html>


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Daniel Veillard 2006-10-13 12:43:50 UTC
Okay, I found the problem and fixed it in CVS:

paphio:~/XML -> xmllint --html tst.html
tst.html:2: HTML parser error : error parsing attribute name
bad tag <http://bla.com/>
              ^
tst.html:2: HTML parser error : Tag http: invalid
bad tag <http://bla.com/>
                       ^
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>
bad tag <http:></http:></p></body></html>
paphio:~/XML ->

  thanks,

Daniel