Do you only run htmlspecialchars() on output or is there other functionality you also do?

后端 未结 3 1310
一个人的身影
一个人的身影 2021-01-13 02:47

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 als

3条回答
  •  日久生厌
    2021-01-13 03:24

    I usually use

    htmlspecialchars($var, ENT_QUOTES) 
    

    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.

提交回复
热议问题