I must cleanup some HTML code to remove <style> and <link> tags inside the <body> tag.
I’m already using PHP Tidy to do some cleanup but I did not found how to remove those tags with PHP Tidy.
Do you have a solution ? Or maybe another markup cleaner PHP class…
Don’t know how to do that with Tidy, but you can use DOM
For the
<link>elements, adjust the Xpath to//body/link.