CodeIgniter Forums
xss_clean override ??? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: xss_clean override ??? (/showthread.php?tid=22023)



xss_clean override ??? - El Forum - 08-27-2009

[eluser]egoslip[/eluser]
I have global xss_clean enabled and im trying to add javascript into a textarea and I get [removed] instead of the [removed] tag,

is there any way to allow this one textarea to override the xss_clean and be able to add javascript ???

its only this one text area as i want the rest of the sites to still use the xss_clean


xss_clean override ??? - El Forum - 08-27-2009

[eluser]Dam1an[/eluser]
You could always just have a conditional statement in the config file, so for that controller/function, you don't have global XSS filtering, and the rest of the time, you do


xss_clean override ??? - El Forum - 08-27-2009

[eluser]egoslip[/eluser]
ok im still trying to get use to CI so how can I get what's the current controller called in side the config.php file ?? sorry for the stupid question i just dont know the call to get the controller in a system file


xss_clean override ??? - El Forum - 08-27-2009

[eluser]Dam1an[/eluser]
Hmmm... Ok, you can use get_instance as it's not available at that point Sad
You could always use $_SERVER['REQUEST_URI'] but that gives the URI from the web root and starts with a forward slash, so you might get a bit more data then you need, but you should be able to work something out from there
But there must be a more elaborate method... maybe a hook?