FreeKB - CKEditor Parse content through PHP htmlspecialchars
CKEditor - Parse content through PHP htmlspecialchars

CKEditor will change the opening bracket character < to the markup &lt; and closing bracket character > to &gt;.  For example, if <input type="text"> is placed inside of a CKEditor code snippet, &lt;input type="text"&gt; will br produced. This will cause problems with CKEditor and the web page.

 As an example, let's say you are using PHP to retrieve data from a column named content in a SQL database.

   $content = $row["content"];


The PHP htmlspecialchars function can be used to fix the problem where CKEditor changes certain special characters to HTML. 

   $content = htmlspecialchars($row["content"], ENT_QUOTES);


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 0aa20 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |