Jump to content

[SOLVED] Escaping too much data!


garry

Recommended Posts

Alright, so hopefully this wont be too hard to solve.

 

I'm using TinyMCE editor on my site, and it allows users to add styles to text. The problems arise when it uses the <span> tag.

 

Say for example, if TinyMCE added <span style="somethinghere">some text here</span>.

 

Because I have mysql_real_escape_string on, it will escape the style="" to become style=\"\" and so the styles won't display :(

 

How can I make it so that it won't escape inside the tags that I specify to fix this?

 

Thanks!

Link to comment
Share on other sites

mysql_real_escape_string only escapes data while it is being inserted into your database. Your database shouldn't store the slashes as well.

 

If your data is being stored with the slashes in place then there is something wrong. Make sure magic_quotes_gpc() is not enabled.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.