Home Forums General Issues Forward slashes escaped in JSON


Forward slashes escaped in JSON

  • I think this is a bug. I have a textarea in wp-admin, based on ACF. When I enter three lines, I get the following JSON:


    As you can see, <\/h2> is not valid. It seems like there is a bug.

    How can we get this fixed?

  • This is how your cone is represented in JSON.

    Do this somewhere echo json_encode('<h1>Some Text</h1>');

    and you will see that the output is "<h1>Some Text<\/h1>"

    special characters must be escaped in json

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.