@Spevacus If you're not wanting to manually parse HTML (which you really shouldn't, except for really easy cases, for which this might qualify), you could use a
DOMParser
, which is easy to do and gives you a DOM. Alternately, jQuery will do it, but I recommend against using jQuery for it in most instances where you're not in control of the source text, as jQuery will go out of its way to run any
<script>
elements which are provided.