For my CMS I am using TinyMCE for a text editor to edit just the text put on a site. So people with limited html knowledge can still edit the content effectively.
My issue is that I have it set up so the content is stored in the database, and to prevent sql injection it is run through the mysqli_real_escape_string before it is stored in the database. I also have it run through stripslashes, because otherwise when you reopen it with TinyMCE for whatever reason it messes up the urls in links...
In anycase after being stored in the database my end result is the html script...and a bunch of leftovers from the mysqli_real_escape_string. Is there anyway to reverse what the mysqli_real_escape_string inserts into the code when it is printed on the site, and when it is printed in the editor?