php - Save into database less and html -
i have site developed in cakephp (php) , in page user can insert textarea less code (css) , in textarea html code.
i want store database problem is:
- validate textarea usre doesn't insert bad code (iframe banner...) preserve security database , site, exist parsing, pattern , regular expression less code (css) , html code save database without possibility insert insane code php, cakephp(with model validation) or javascript?
thanks
validating , filtering html complex problem , might make sense restore tools written. here nice comparision (it might bit biased towards html purifier covers functionalities , problems of different solutions pretty wall)
http://htmlpurifier.org/comparison
if not sure tags should banned simplest approach filter against list of tags explicitly allow (whitelist)
Comments
Post a Comment