When outputting user input, do you only use htmlspecialchars() or are there are functions/actions/methods you also run? I’m looking for something that will also deal with XSS.
I’m wondering if I should write a function that escapes user input on output or just use htmlspecialchars(). I’m looking for the generic cases, not the specific cases that can be dealt with individually.
I usually use
on input fields. I created a method that does this because i use that a lot and it makes the code shorter and more readable.