15

I have html in a set of elements so there may be other items like this

<b><a title="San Francisco/Twin Peaks-Lake Merced">Twin Peaks</a></b>

but I would like to clean it up with jsoup like this

<b>Twin Peaks</b>

Would using a whitelist be the best idea?

1 Answer 1

26

sorry for cluttering up stackoverflow, but unwrap solves the problem.

document.select("a").unwrap()
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.