Results 1 to 2 of 2

Thread: Weird issue with html characters and quotes...

  1. #1
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default Weird issue with html characters and quotes...

    On my CMS (Content Management System), There are two textareas submitted before the information is actually replaced for that page. The issue starts after the first textarea is submitted (to the second one). Say, they put:

    HTML Code:
    <a href="something.html">Next&gt;&gt;&gt;</a>
    They hit submit, and the confirmation page shows:

    Code:
    <a href=\"something.html\">Next>>></a>
    Why does it add the backslashes to the quotes and parse the html entities??? This is going to confuse my clients, and it's annoying having those backslashes in the code, anyway. Especially because if you don't take them out and edit the information, another backslash is added! So then there's 2 in front of each quote...

    I know there's PHP functions that deal with html and stuff - any ideas?
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Hey, I fixed it. Used a combination of htmlentities(), html_entity_decode(), and stripslashes().
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

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
  •