I get this question all the time: Is strip_tags() secure?
My answer is always: Yes and No.
It depends how and where you use it, so let's take a look at some of the common use cases and pitfalls.
https://securinglaravel.com/security-tip-is-strip_tags-secure/#Laravel