In a PHP script I'm accepting input from the user from a textarea
and want to allow a few basic tags. So when I output the string I'm using -
echo strip_tags($content, '<b><i><ul><ol><li>');
Now normally I would use FILTER_SANITIZE_STRING
but that would strip all tags and I would use html_entities()
but that would prevent the tags I'm passing through from displaying as they should.
So what else do I need to strip or encode and how do I do that?