Reputation: 2767
For REGEX, I am wondering how I would clear all HTML tags entered except for the simple ones, such as <a>, <b>, <i>, <pre>
. I know that I can use this regex to exclude all html charicters, but I am not sure how I would go about only removing some, and deleting the others while conserving the content inside. Thanks!
Upvotes: 0
Views: 502
Reputation: 2273
See the second parameter in :
Essentially, you can call this function and list the tags you don't' want to be stripped.
Upvotes: 6