Passing HTML using JSON
Posted
by ActionFactory
on Stack Overflow
See other posts from Stack Overflow
or by ActionFactory
Published on 2010-06-15T16:55:00Z
Indexed on
2010/06/15
17:02 UTC
Read the original article
Hit count: 208
Hi All, I'm passing Data using JSON to iPhone and iPad. One Field of Data is HTML.
The problem is the encoding.
Here's what I get back:
> "GadgetHTML": "<strong>Hello</strong>
> from Catworld<br />\n<img alt=\"\"
> src=\"http://www.iconarchive.com/icons/fasticon/ifunny/128/dog-icon.png\"
> />",
The \ are killing me. The \n does not help.
Any good way to do this?
Any JSON to HTML Cleaning Functions? Encoding?
(There must be something better than manually removing )
Thanks
© Stack Overflow or respective owner