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:
<span #99cc00;">selected word</span>
so, can see : span #99cc00;"
should be:
span=" #99cc00;"
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
Post a Comment