Remove all html tags and content except for a div class
- by Crazy
I want to remove all html content from a string except for a div class : <div class="toto">blablabla</div>
Should I use a Regex or DOM Parser?
To answer drachenstern :
It's a comment content with bbcode.
And the html in this div is generated with Geshi (code highlighter) so i don't want to delete this.
For example a visitor can enter <script></script> in a [code][/code] bbcode tag.
All HTML outside the [code][/code] bbcode tag must be delete no?