views:

45

answers:

0

I'm using serialize in .post request and it looks like this

    $.post(this.action, $(this).serialize(), null, "script");

In the form there is a textarea with the name 'comment'. The problem is that when I put first string in double quotes, followed by end line and then some text server recieves only first string without quotes. For instance text in textarea:

"first string"
second string

Server recieves only 'first string' without quotes. I checked with FireBug what jquery sends to the server when I submit:

comment=%22first+string%22%0Asecond+string

And it looks like no problem here. So why it gets cut? It works well though f I put something in the beginning of the first string or double quotes in any other part of the text. Backend is Ruby on Rails.