Results 1 to 3 of 3

Thread: htmlspecialchars not doing job

  1. #1
    Join Date
    Dec 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face htmlspecialchars not doing job

    I can not figure out why when using:
    Code:
    		$description = $row['DESCRIPTION'];
    		$description = htmlspecialchars($description);
    $description returns
    Modular �T�
    instead of
    Modular "T"
    Could anyone please help? I am dumbfounded.

    Thanks.

    Corey

  2. #2
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Could it possibly be that since special character codes like © have a ";" which indicates the end of a line for php... I highly doubt thats the reason... but otherwise idk...

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    � is not a special character in HTML, and even if it were it wouldn't be converted to a quote. What are you trying to do, and why do you think htmlspecialchars() will do it?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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