Regex 101 Exercise I5 - Remove unapproved HTML tags from a string
Regex 101 Exercise I5 - Remove unapproved HTML tags from a string
When accepting HTML input from a user, allow the following tags:
<b>
</b>
<a href=…>
</a>
<i>
</i>
<u>
</u>
and remove any others.