From: Dmitry Borodaenko Date: 2006-11-30T23:20:45+09:00 Subject: Re: HTML cleanup task On 11/30/06, Victor Zverok Shepelev wrote: > My task is: I have some HTML fragment; no limitations on it correctness, > except of there can't be tag cutted: (...) > Can it be done with Hpricot? Or any other options? Tried HTMLTidy[0]? Sometimes it tries to be too smart, but it has a lot of options. The way I do it[1] probably won't suit you, but might give you some ideas. [0] http://rubyforge.org/projects/tidy/ [1] http://cvs.savannah.gnu.org/viewcvs/samizdat/samizdat/lib/samizdat/sanitize.rb?rev=1.99 -- Dmitry Borodaenko