passing \n from javascript to python
<p>I finally overcame the problem of passing full <code>utf-8</code> strings from javascript to python, but now the carriage return <code>"\n"</code> which is present on the Javascript side is missing when the string is received in python.  Is there something I'm supposed to do to achieve this?</p>

<pre><code>function saveMeetingComments(){
    var komments = $('#cmt_t').val()
    var d = new Date();
    var commentsText  = $('#cmt_t').val()
    var abc = ''
    var request = par_makeHttpObject();
    commentsText = stringTranslate(commentsText,"'",'`');
    request.open("POST", "saveMeetingNote?clientID="+clid_+
             "&amp;co_ID="+coid_+
             "&amp;msgDate="+dateFormat(d, "dddd, mmmm dS, yyyy, h:MM TT")+
             "&amp;MeetType="+AGM_+
             "&amp;MeetDate="+meetdate+"-"+
             "&amp;Comments="+commentsText , false);
    request.send();
    $('#cmt_t').val('');
    parkAll();
}
</code></pre>

<p>Comments is the only variable which may have carriage returns.  On the Python side the code is as follows:</p>

<pre><code>def saveMeetingNote(self, **kwargs):
    clientID         = kwargs['clientID']
    co_ID            = kwargs['co_ID']
    MessageDate      = kwargs['msgDate']
    MeetingType      = kwargs['MeetType']
    MeetingDate      = kwargs['MeetDate']
    Comments_        = kwargs['Comments']
    coName = dennislib.CompanyCoID2NAME(co_ID)[0]['FName']
    ret = dennislib.saveMeetingNotes(clientID,co_ID,MessageDate,MeetingType,MeetingDate,Comments_,coName)
    return 
saveMeetingNote.exposed = True
</code></pre>

<p>Inspecting Comments_ shows that the <code>\n</code> are all gone...</p>

<p>TIA</p>

<p>Dennis</p>
