XSS filtering function in PHP

前端 未结 10 1639
轮回少年
轮回少年 2020-11-27 11:18

Does anyone know of a good function out there for filtering generic input from forms? Zend_Filter_input seems to require prior knowledge of the contents of the input and I\'

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 11:43

    htmlspecialchars() is perfectly adequate for filtering user input that is displayed in html forms.

提交回复
热议问题