mysql - Data sent from TinyMCE not saving in proper format -


i using tinymce saving data. when change color of selected text green , show as html output is:

text bla bla bla <span style="color: #99cc00;">selected word</span> lorem ipsum sads 

and after saving in mysql database stored like:

&lt;span  #99cc00;&quot;&gt;selected word&lt;/span&gt; 

so, can see : span #99cc00;&quot; should be:

span=&quot; #99cc00;&quot; 

but isn't.

any idea why first double quotes escaped , equal sign too? how save them database too?

use htmlspecialchars function before storing data in database.

you can see tutorial here.

and after fetching data, when echoing use html_entity_decode function. convert in html comes database.

the tutorial here: tutorial.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -