Join chat rooms and explore programming content on Chat-to.dev.
i created this function to sanitize the input fields on my site, but i need it (the function) to allow the input of some html tags. how can i improve the function to allow this?
You'd probably get more feedback if you posted a proposed solution (or "correct answer") to StackOverflow and let the community tell you how dumb you are in between generating exactly what you are looking for.
Real answer: consider passing Markdown through instead. You're getting really close to one of my favorite memes. It's a dark path, don't tread down it.