how to remove bogusetag by hpricot?

I have use hpricot to translate users' input html. I want to remove bogusetag as follows:

doc = Hpricot "<p> test world</b></p>", :xhtml_strict => true

=>#<Hpricot::Doc {elem <p> " test world" {bogusetag </b>} </p>}>

doc.to_s

=>"<p> test world</b></p>"

what I expected is "<p>test world</p>" without bogusetag </b>, is it possible?

Haven't tried it, but you may want to look into the :fixup_tags option.

--Matt Jones