PHP XSS Question / Clarification

后端 未结 3 557
一向
一向 2021-01-12 22:50

This has been asked before but I need 100% clarity on this issue as it\'s very important for me to get it right.

The situation: A message system on a website. The

3条回答
  •  失恋的感觉
    2021-01-12 23:55

    Use htmlspecialchars when outputting on an HTML page. It will display the data the same way the user entered it (so users can use something like <3 in their messages without stripping the rest of it)

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题