There is a question on SO How to send HTML code in an http POST request? and works good in sending but receiving of HTML and decode it back to original HTML is not working
My HTML Code as
<div id="TypePostBox">
<div style='margin-top:20px;'>Hello World</div>
</div>
Currently I am posting with JQuery with this code as suggested in above link
var cod = encodeURIComponent($('#TypePostBox').html());
//code to POST with jquery
console.log(cod);
//Output in console as %26lt%3Bdiv%20style%3D'margin-top%3A20px%3B'%26gt%3BHello%20World%26lt%3B%2Fdiv%26gt%3B
and receiving it in php as
echo rawurldecode($_POST['dt']);
//PHP Output as <div style='margin-top:20px;'>Hello World</div>
How can I send and get the exact HTML Code? I want to POST not GET with Jquery / Javascript. I am ajaxing it.
I just want to send exact HTML and receive exact HTML, What can be done?