markquee
(Markjohn42)
May 14, 2014, 2:27am
1
Hi guys! need help about purifying the input i mean the chtmlpurifier. i use it in validation rule like this
array('title, content, state','filter','filter'=>array($obj=new CHtmlPurifier(),'purify')),
question:
Is my validation correct,that purify my attributes title,content and state?
is the purifier run only in every input?i mean is it work only in create(),update() like and not in view(). co’z im concern in speed if i want to view it…
jkofsky
(Jkofsky)
May 14, 2014, 5:59am
2
Hi guys! need help about purifying the input i mean the chtmlpurifier. i use it in validation rule like this
array('title, content, state','filter','filter'=>array($obj=new CHtmlPurifier(),'purify')),
question:
Is my validation correct,that purify my attributes title,content and state?
is the purifier run only in every input?i mean is it work only in create(),update() like and not in view(). co’z im concern in speed if i want to view it…
I “think” you are correct about working with the given attributes. Will it actually “purify”, never tried so don’t know.
You could add ‘on’=>‘insert, update’ to this validator to make sure it only runs on create/update.