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 开发者_StackOverflow社区jQuery.post().
How can I test if a string is URL encoded? Which of the following approaches is better? Search the string for characters which would be encoded, which aren\'t, and if any exist then its not encoded