Hi There

I have been struggling to correctly format a datastring to be sent via
POST that may contain 'invalid characters'. I am trying to send text &
html via ajax post, and this has been achieved mainly due to
Javascript's escape() function. For example, to send the ampersand
(&), escape() is used to convert the character to it's (8bit?) value.
For the most part the escape function correctly formats the data
string, but there are certain characters that will not be escaped, and
will be processed literally, eg: the plus (+) character.
I assume the reason why I cannot send the + char as part of the data
string, is because if the + is used in the url it is seen as an
escaped space character.
Without completely re-working my system, is there any possible way of
sending all data literally in a data string using $.ajax via post?

I'm using the following code:
$.ajax({
                type: "POST",
                url: '/cms_page_manager/savepage',
                data: dataString,
                error: function(XHR, status, error) {
                },
                success: function(msg){
                }
         });

Any suggestions would be greatly appreciated. I wish I had some more
experience with character handling, right now i'm about to pull my
hair out!
Many thanks in advance.

Reply via email to