mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 01:45:08 -05:00
When serializing text, encode all line breaks as CRLF pairs per the application/x-www-form-urlencoded specification. Fixes #6876.
This commit is contained in:
committed by
Colin Snover
parent
7e2810fa95
commit
eed3803c98
@@ -107,9 +107,9 @@ jQuery.fn.extend({
|
||||
null :
|
||||
jQuery.isArray(val) ?
|
||||
jQuery.map( val, function(val, i){
|
||||
return {name: elem.name, value: val};
|
||||
return {name: elem.name, value: val.replace(/\r?\n/g, "\r\n")};
|
||||
}) :
|
||||
{name: elem.name, value: val};
|
||||
{name: elem.name, value: val.replace(/\r?\n/g, "\r\n")};
|
||||
}).get();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user