I have a form in a webpage, where the user can enter any arbitrary html. Once he clicks submit, I am sending the content to the webserver via AJAX using jQuery.post().

But for certain HTML, I am getting this response from the server

```
HTTP/1.0 400 Bad Request 
Content-Type: text/plain
Date: Mon, 26 Oct 2009 05:28:00 GMT

BAD REQUEST: Bad percent-encoding.

```

I tried changing post to get, but still facing the same issue. Does anybody know what is causing the issue and please let me know how to fix it. Thanks!

EDIT:

I guess it seems to be more of an issue with the server rather then with jQuery. Earlier I was using nanoHTTPD server and it was giving me BAD REQUEST as response. I tried to send the same request to Apache and it seems to work.