Remove orphaned html elements from html string
Hi,
Does anybody have any thoughts on how I might remove orphaned html elements from a string of html?
The string might be quite long.
I am trying to parse html content for output in an RSS feed and am getting stuck because there are orphaned html elements, like an open <strong> element with no closing element, all over the place.
Any help would be much appreciated. Thanks.
__________________
http://www.thewebsiteshop.co.uk
|