Security risks from user-submitted HTML

后端 未结 4 1872
长情又很酷
长情又很酷 2021-01-21 07:22

I am using a contentEditable div that allows users to edit the body HTML and then post it directly to site using an AJAX request. Naturally, I have to do some security checks o

4条回答
  •  轮回少年
    2021-01-21 07:48

    Did you think about security risk from and objects?

    I'd use strip_tags() for stripping html tags

    提交回复
    热议问题