http://qs321.pair.com?node_id=192449


in reply to Re: Re: Keeping bad HTML bad
in thread Keeping bad HTML bad

if it displays in a browser when I get it, it has to display the same way when it leaves

Then you don't want to use HTML::TreeBuilder on it if it's not interpreting your bad html correctly. Maybe if you expanded on what sections of the html you are allowing the user to change we can help with a solution.

Replies are listed 'Best First'.
Re: Re: Re: Re: Keeping bad HTML bad
by trs80 (Priest) on Aug 23, 2002 at 21:26 UTC
    It allows for editing meta tags, title tag, title attribute in anchor tags, and alt attributes in image tags. That part works fine and HTML::TreeBuidler makes it fairly simple. The problem lies in the reconstruction of pages with non compliant HTML.

    I have looked at HTML::Parser and HTML::TokeParser, but they don't do the heavy lifting that HTML::TreeBuilder does for me. I am trying to avoid reinventing the wheel by using HTML::TreeBuilder. According to the change log HTML::TreeBuilder there was a known bug with handling out of place information inside of table, but doubt if they invisioned anything as bad as non table tags outside of th, tr, caption, td, etc. tags within a table.