The wp_editor
function is working fine concerning the displaying of editor and sending of information, except that the information is never sent as it is.
In a template file responsible of updating posts from front end, var_dumping always shows differences betweeen the content coming from database and content sent by editor via POST variable, even the user changes nothing under the editor.
One of the problems for instance, is that the string sent by POST variable is containing "\
instead of "
.
In the website I am creating, I need to display the differences between the edits of a post using PEAR text_diff library. Application tells me that there is always difference between edits, even it is not the case, because even after esc_attr
, and strip_tags
, there are differences (double quotes for example).
Can you please give me an insight on how to resolve such issue? Are there any techniques to make wp_editor works right? Or should I code my own editor??
Thank you very much for your time and assistance.
\"
instead of"\
? If so, have you tried usingstripslashes()
onwp_editor
's output?"
by\"
.stripslashes()
should translate\"
to"
for you.wp_editor()
's part -- that's part of escaping certain characters in order to safely insert strings into the database, etc. See Data Validation, for example.