• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xss_clean

#1
[eluser]Cesar Kohl[/eluser]
Is there any difference between

Code:
$this->input->xss_clean($example);

and

Code:
$this->form_validation->set_rules('example','Example','xss_clean');

?

If I use both will it be redundant?

Thanks in advance!

#2
[eluser]BrokenLegGuy[/eluser]
I am 98.44356543524363546% sure that they're exactly the same thing as....

Code:
$data = $this->security->xss_clean($data);

It's just a different method of using the same functionality

It can be found here
http://ellislab.com/codeigniter/user-gui...urity.html
and here..
http://ellislab.com/codeigniter/user-gui...elper.html
and here...
http://ellislab.com/codeigniter/user-gui...input.html
and other places that I just got lazy I didn't care to list. Smile
I hope it helps!

Ohh, and if I'm wrong....please be genital.

Ed

#3
[eluser]leighmarble[/eluser]
This just tripped me up, while upgrading from CI 1.7.2 to CI 2.1.1. Since that required six steps of upgrade, I'm not sure where this happened, but...

This is no longer valid, and kills execution of the script:

Code:
$this->input->xss_clean($example);

The Security class must apparently now be used instead of the Input class for XSS filtering. I did not see this anywhere in the upgrade steps.

Leigh


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.