Skip to content

Instantly share code, notes, and snippets.

@pronskiy
Created September 5, 2012 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pronskiy/3635704 to your computer and use it in GitHub Desktop.
Save pronskiy/3635704 to your computer and use it in GitHub Desktop.
XSS protection on Yii
...
public function rules()
{
return array(
array('attributes, that, are, edited, by, user','filter',
'filter'=>array($obj=new CHtmlPurifier(),'purify')),
...
);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment