Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder hinch's Avatar
    Join Date
    Sep 2005
    Thanked 80 Times in 80 Posts

    TinyMCE oddities

    I'm using the TinyMCE RTF editor on a site and I've got it setup for multiple locations.

    The first instance on the company details page works just fine without prepending the stray char.

    However on the company add offer page for some reason on post its inserting a stray character at the very start of the posted variable.

    So this is the tinymce text area.

    <textarea id="offerdescription" name="offerdescription" rows="15" cols="80" style="width: 80%"></textarea>
    This is how I retrieve the data (its in a function wrapper normally thats why no $_POST)

    PHP Code:
    $offerdescription mysql_real_escape_string(htmlentities($offerdescription)); 
    Now thats working fine for replacing normal html characters however for some reason in the database I now have its perpending a.

    Â which when ran through htmlentities() is coming back as &Acirc;

    The page is already set to <meta http-equiv="Content-type" content="text/html; charset=UTF-8" /> in header and the text area is empty on page load.
    It looks to me to be mysteriously pulling in this Acirc randomly I can't find where its coming from or whats causing it.

    Updated it only seems to appear when I use £ as the lead character any other character is fine and the Acirc doesn't appear
    Last edited by hinch; 12-03-2008 at 04:32 PM.
    A programmer is just a tool which converts caffeine into code

    My work: http://www.fcsoftware.co.uk && http://www.firstcontactcrm.com
    My hobby: http://www.angel-computers.co.uk
    My life: http://www.furious-angels.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts