A function that will remove HTML and tags from a string?

Use a PHP function to do this: https://php.net/strip_tags

example:

echo strip_tags("<div>my text</div>");