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 2 of 2
  1. #1
    Master Coder
    Join Date
    Apr 2003
    in my house
    Thanked 201 Times in 197 Posts

    HTML::Entities; Resolved


    I am storing the usual type of form data supplied from a textarea. It may include French characters such as é which are to be allowed into the db.

    When I use the following code, however, the é is being changed to &ampeacute; so that it is being stored that way in the db. then when I recall it to display it on a page, it shows on the screen as é because the & is there.

    the regex I have tried isn't fixing the issue so I wonder if there is a straightforward error that I am overlooking.

    surely this is a bit clunky?

    $description = $vars{'description'};
    $description = encode_entities($description);
    $description =~ s/&/&/g;
    it would help if I was editing the same script as the one I was looking at My 'problem' doesn't actually exist.

    Last edited by bazz; 09-30-2010 at 04:15 PM.
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  2. #2
    Regular Coder
    Join Date
    Mar 2008
    Forfar, Scotland
    Thanked 39 Times in 39 Posts
    LOL! Common problem. I've done that before.


Posting Permissions

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