Bugs: Browse | Submit New | Admin

[#4916] Parsing bug for table thead?

Date:
2006-07-02 21:11
Priority:
3
Submitted By:
Peter Krantz (peterkz)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Parsing bug for table thead?

Detailed description
Using the followng html in irb:

htm = "

<TABLE summary='my summary'>
<THEAD>
     <TR><TH>first header</TH></TR>
</THEAD>
<TFOOT>
     <TR><TD>First</TD></TR>
</TFOOT>
<TBODY>
     <TR><TD>First</TD></TR>
     <TR><TD>First</TD></TR>
</TBODY>
<TBODY>
     <TR><TD>First</TD></TR>
     <TR><TD>First</TD></TR>
     <TR><TD>First</TD></TR>
</TBODY>
</TABLE>"

irb(main):066:0> soup = BeautifulSoup.new(htm)

irb(main):067:0> soup.table.thead
=> <thead>
</thead>

Looks like the tr and th contained in thead are removed? RubyfulSoup seems to yank them to the same level as the thead
element.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item