开发者

How to safely save user inputed code to the database

I have section on my site where users can submit code. I want to safely store to the database.

I am using php. I tried using html purifier to save data to the database, but it removes all the code.

I appreciate any help.

开发者_StackOverflow中文版Thanks.


When you save to the database using cakephp's save method, you are automatically protected from SQL injection.

Useful Link:

http://nuts-and-bolts-of-cakephp.com/2009/08/06/save-now-sanitize-later/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜