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/
精彩评论