I have a php page that is returning some data in json. Basically I am doing echo on this page.
The data being returned has some html tags. This is causing my jQuery code to break.
Is there a way to clean up the data and strip off the tags before putting it in the json object?
Furthermore, I am trying to display the data from json into a textarea and ideally I would like to show the html tags in the textarea...
When you create the json, you can use json_encode() on the values that have html in your php code - this will escape the values in json so that it validates and will be usable in jquery. I haven't tried it, but you should not have a problem adding the value to a textarea.