Daniel Jabbour
unread,May 29, 2012, 6:38:39 AM5/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nokogiri-talk
Hi all-
So I'm running an HTML fragment through nokogiri, and I'm getting some
odd behavior. My fragment is a little non-standard, HTML wise, but I'm
confused by what's going on, and wondering if you can help explain
(and surpress) the behavior I'm seeing.
Basically, I've got a fragment, which I'm running through
Nokogiri::HTML.fragment(<fragment>). The fragment contains an a tag,
around a table (ex <a ...><table>...</table></a>). However, when I run
the fragment through nokogiri and to_s it, it rewrite the a tag so it
no longer surrounds the table (ex <a...></a><table>...</table>).
So basically:
1) Why is it doing this?
2) How can I stop this behavior?
Any insight would be appreciated!
Thanks kindly,
Daniel