Off the top of my head I do not think stripTags works over each element of an array like $this->data
You would need to be specific to the key like $this->data['GoogleNews']['content'] or whatever field. Check out Sanitize::clean , that works thru the array of $this->data with 8 different options to apply to the data set. Dave -----Original Message----- From: Lord_JABA [mailto:lordj...@gmail.com] Sent: December-13-10 5:48 PM To: CakePHP Subject: Why Sanitize::stripTags not working in controller index() function; I want to get rid of div tags in data from rss just before i send it to view. I'm trying do this that way: function index(){ $this->data=Sanitize::stripTags($this->data, 'div'); $this->set('gnews', $this->paginate('GoogleNews') ); } and that way: function index(){ Sanitize::stripTags($this->data, 'div'); $this->set('gnews', $this->paginate('GoogleNews') ); } but I'm still getting: (...)HTC EVO 4G</a></div><div></div><div>(...) from<?php debug($gnews)?> What mistake I'm making?? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en