CodeIgniter Forums
what's the correct way to store HTML in a database ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: what's the correct way to store HTML in a database ? (/showthread.php?tid=35105)



what's the correct way to store HTML in a database ? - El Forum - 10-19-2010

[eluser]g_montel[/eluser]
Hello

I'm working on the back-office of my website, and the user can input some HTML on the news database.

The problem I have is, on my controller, if I use
Code:
$content = set_value('content')
The content is "htmlentities"-fied (i.e. <b> are transformed to & l t ; b & g t ; )

if I use
Code:
$this->input->post('content', TRUE)
It works OK.

But is it secure enough ? Should I use set_value ?

Thanks for your help

Geoffroy