scoumbourdis / grocery-crud

Grocery CRUD is a PHP Codeigniter Framework library that creates a full functional CRUD system without the requirement of extra customisation to the JavaScripts or the CSS to do it so.
http://www.grocerycrud.com
GNU General Public License v3.0
1.01k stars 472 forks source link

How to filter html tags on rendering. #457

Open fakirpic opened 6 years ago

fakirpic commented 6 years ago

Hi i am inserting data with another application that allows html tags, but i dont want they get rendered as h tml in grocery-crud

public function datas()
{
$crud = new grocery_CRUD();
$crud->unset_add();

$crud->set_table('datas');
$output = $crud->render();

$this->_example_output($output);        
}

this is my basic rendering func. also i enabled $config['grocery_crud_xss_clean'] = true; in application\config\grocery_crud.php

jasteele12 commented 6 years ago

Are you looking for PHP's strip_tags() function?

http://php.net/strip_tags