Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
When serializing text, encode all line breaks as CRLF pairs per the a…
…pplication/x-www-form-urlencoded specification. Fixes #6876.
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")}; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dmethvin
Author
Member
|
||
}) : | ||
{name: elem.name, value: val}; | ||
{name: elem.name, value: val.replace(/\r?\n/g, "\r\n")}; | ||
}).get(); | ||
} | ||
}); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This only gets run for multiple selects - Is the replacement needed here? Also, perhaps the regex should be cached at top like all the other regex's used in ajax.js and (jquery core).