I am working on a CMS with codeigniter. Users are supposed to know HTML and construct the page themselves. Now, I am having problems with storing some tags in the database (mysql database).
Users can upload images to the server and then use the path of the image in the code. The code is edited in a . When I try to update the code of a certain page to:
<img src="assets/fileserver/versje2.jpg" alt="" />
everything works. But when I apply inline style to it
<img style="width: 200px;" src="assets/fileserver/versje2.jpg" alt="" />
it won't work. It simply ignores the style and the following is stored in the database:
<img src="assets/fileserver/versje2.jpg" alt="" />
it simply removes the style. How is this possible?
I have tried:
-htmlspecialchars
-htmlentities
$config['global_xss_filtering'] = FALSE;
$config['global_xss_filtering'] = TRUE;
Any suggestions on what the problem could be?