PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 10, 2022

[FIXED] Font Size is not saving in DB - ckeditor

 January 10, 2022     ckeditor, codeigniter, php     No comments   

Issue

I am using Full package of ckeditor and here i am facing a strange problem from 2 days. Everything is working fine but font-size is not working at all . when I select a line and change it's font size, it shows the correct code in source mode:

<span style="font-size:9px">My selected line</span> 

but when i save this result in database it converts this line to something like below.

<span xss=removed> My selected line</span>

I am using CodeIgniter and not using any special function before saving my data. just using post function of CI.


Solution

Seems like codeigniter cleans your html against XSS attacks.

Use it with caution:

$this->input->post('html', false);

The second parameter will disable the XSS filter.



Answered By - mvpasarel
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing