I'm working with Mercado Livre API.
Since the user is allowed to use HTML in description field, I must allow it too. I'm using AJAX to communicate with Mercado Livre, but when I'm trying to parse a big HTML code, I'm not able to use json_decode on PHP.
How can I encode the user's HTML before sending it to PHP and decode it when it's received?