Display TinyMCE inputted text causing undisplayable characters

107 Views Asked by At

Text error

Website is set to use UTF-8 so this should not be the issue:

<meta charset="utf-8">

Looking in the TinyMCE "View Source" option here is what the code looks like:

<p>Posted by J. King</p>
<p>This is just a test. &nbsp;This is just a test.</p>
<p>&nbsp;</p>

And looking in the database it is sanitised and converted to the following:

&lt;p&gt;Posted by J. King&lt;/p&gt;
&lt;p&gt;This is just a test. &amp;nbsp;This is just a test.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

I'm using html_entity_decode to convert the saved database text back to the proper formatting it should have. I thought I did everything by the book here, and didn't think I did anything wrong? Is there something I can do to fix this?

0

There are 0 best solutions below