Jump to content

tinymce span style color not working


vinpkl

Recommended Posts

hi all

 

I m using tinymce for adding content to my website.

 

also i m using

$detail = mysql_real_escape_string('$detail');

 

When ever i select text and change its colour, tinymce add <span> tag to it with a slash in style attribute.

 

This is what is getting added to my database

 

 

<p><span style=\"color: #3366ff;\">Feel free to try</span> out the different features that are provided,</p>

 

When i echo it on my detail page

echo $detail;

 

then the style color doesnt get applied on the text.

 

what should i do to echo the text in colored format.

 

vineet

 

Link to comment
Share on other sites

First off, this won't work.  Why single quotes around the var?

$detail = mysql_real_escape_string('$detail');

Second, assuming that's not really your code, you should check get_magic_quotes_gpc() and if true run stripslashes() on the data or else you'll end up with slashes in your db data once you use mysql_real_escape_string().

Edited by AbraCadaver
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.