Loading ...
Sorry, an error occurred while loading the content.

730JSON with HTML snippet

Expand Messages
  • weilandaj
    Feb 14, 2007
    • 0 Attachment
      Hi All,

      I'm having some trouble with an element of my web application with json.

      The short story is I am sending database as part of an ajax request.
      One piece of that data is HTML text. On the server end I'm using php
      with smarty templates and need to send a short bit of HTML that comes
      from a template.

      The problem is the html snippet is being severely mangled on the
      browser end (tested in IE and FF). Here's an example:

      {"html":"<a href=\"4427-New-Gaming-Channel.html\"\>New Gaming
      Channel</a\><b\> . 8 Views</b\>","id":"4427"}

      The HTML becomes:

      <a ew-Gaming-Channel.html">New Gaming Channel</a><b> . 8 Views</b>

      I've tried all sorts of escaping and other things. I'm really stuck
      as to why this happens.

      Thanks for you help.
    • Show all 7 messages in this topic