I have seen whitelist based sanitizers for HTML in Ruby, but I need the opposite, I need ONLY links removed from a page to be readied for PDF conversion. I tried Sanitize, but it does not fit what I need as it is too difficult to guess what HTML elements will be used on the fetched page, so that I can add them to the list.
If my input was
<a href="link">Link!</a>
<b>Bold Text</b>
<div>A div!</div>
I would want
Link!
<b>Bold Text</b>
<div>A div!</div>
to be the output.
Is there any 'blacklist-based sanitizer' for Ruby?