I have a textarea where I insert \\n when user presses enter. Code from this textarea is sent to a WCF service via jQuery.ajax(). I cannot save
\\n
jQuery.ajax()
it could be done like this:
$('textarea').val().replace(/\n/g, "");
edit: sorry ... the regular expressions in javascript should not be quoted
working example