阅读背景:

在使用Javascript将其添加到DOM之前清理用户输入

来源:互联网 

I'm writing the JS for a chat application I'm working on in my free time, and I need to have HTML identifiers that change according to user submitted data. This is usually something conceptually shaky enough that I would not even attempt it, but I don't see myself having much of a choice this time. What I need to do then is to escape the HTML id to make sure it won't allow for XSS or breaking HTML.I'm writing the JS for a chat application I'm w




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: