I need to use javascript to remove all html tags, except for those I explicitly allow. I have a form that only allows the following tags and their respective end tags:
<b> <strong> <i> <em> <u> <br> <pre>
<blockquote> <ol> <ul> <li>
<a href="http://www.somesite.com">link</a>
All other markup should be removed. I have been searching but I have only found instances where all tags are removed or a single tag is removed. Can this be done simply? I cannot use PHP, must be javascript. Any solutions?
Thanks!