How to remove bogusetag by hpricot?

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

doc = Hpricot "

test world

", :xhtml_strict => true
=>#<Hpricot::Doc {elem

" test world" {bogusetag }

}>

doc.to_s
=>"

test world

"

what I expected is “

test world

” without bogusetag , is it
possible?

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

–Matt J.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs