Skip to content

Commit 248205c

Browse files
BartVanBeurdenDVLP
authored andcommitted
Bugfix: encodeURIComponent when using serverSentEvents and form-urlencoded
1 parent 6cf04d5 commit 248205c

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

build/jQueryShim.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ var ajax = function ajax(options) {
7979

8080
request.open(options.type, options.url);
8181
request.setRequestHeader('content-type', options.contentType);
82-
83-
request.send(options.data.data && 'data=' + options.data.data);
82+
request.send(options.data.data && 'data=' + encodeURIComponent(options.data.data));
8483

8584
return {
8685
abort: function abort(reason) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
"scripts": {
4040
"build": "babel src --presets babel-preset-es2015 --out-dir build"
4141
},
42-
"version": "0.1.8"
42+
"version": "0.1.9"
4343
}

src/jQueryShim.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ const ajax = function(options) {
7878
request.withCredentials = options.xhrFields.withCredentials;
7979
request.open(options.type, options.url);
8080
request.setRequestHeader('content-type', options.contentType);
81-
82-
request.send(options.data.data && `data=${options.data.data}`);
81+
request.send(options.data.data && `data=${encodeURIComponent(options.data.data)}`);
8382

8483
return {
8584
abort: function(reason) {

0 commit comments

Comments
 (0)