CodeIgniter Forums
Strip HTML tag - 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: Strip HTML tag (/showthread.php?tid=29179)

Pages: 1 2


Strip HTML tag - El Forum - 04-01-2010

[eluser]Mithun[/eluser]
Thank you Sbioko,
I tried out your code and it worked it worked like a charm!
I haven't tried just before because English is a foreign language for me too!


Strip HTML tag - El Forum - 04-01-2010

[eluser]Sbioko[/eluser]
Oh, nice! Thanks! Sorry for my screaming ;-)


Strip HTML tag - El Forum - 04-04-2010

[eluser]CroNiX[/eluser]
From the manual: Note: You can also use any native PHP functions that permit one parameter, like trim, htmlspecialchars, urldecode, etc.

So, you should just be able to add it as a rule.
Code:
$this->form_validation->set_rules('customer', 'Customer', trim|required|strip_tags|xss_clean');



Strip HTML tag - El Forum - 04-04-2010

[eluser]Mithun[/eluser]
Thanks CroNiX, got it


Strip HTML tag - El Forum - 04-05-2010

[eluser]laralaya[/eluser]
I got few things cleared .thanks for the nice information.