File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function reportResultToServer(result, port) {
14
14
out ( `RESULT: ${ result } ` ) ;
15
15
} else {
16
16
let doFetch = typeof origFetch != 'undefined' ? origFetch : fetch ;
17
- doFetch ( `http://localhost:${ port } /report_result?${ result } ` ) . then ( ( ) => {
17
+ doFetch ( `http://localhost:${ port } /report_result?${ encodeURIComponent ( result ) } ` ) . then ( ( ) => {
18
18
if ( typeof window === 'object' && window && hasModule && ! Module [ 'pageThrewException' ] ) {
19
19
/* for easy debugging, don't close window on failure */
20
20
window . close ( ) ;
@@ -24,7 +24,7 @@ function reportResultToServer(result, port) {
24
24
}
25
25
26
26
function sendFileToServer ( filename , contents ) {
27
- fetch ( `http://localhost:8888/?file=${ filename } ` , { method : "POST" , body : contents } ) ;
27
+ fetch ( `http://localhost:8888/?file=${ encodeURIComponent ( filename ) } ` , { method : "POST" , body : contents } ) ;
28
28
}
29
29
30
30
/**
@@ -39,7 +39,7 @@ function reportErrorToServer(message) {
39
39
if ( typeof ENVIRONMENT_IS_NODE !== 'undefined' && ENVIRONMENT_IS_NODE ) {
40
40
err ( message ) ;
41
41
} else {
42
- fetch ( encodeURI ( `http://localhost:8888?stderr=${ message } ` ) ) ;
42
+ fetch ( `http://localhost:8888?stderr=${ encodeURIComponent ( message ) } ` ) ;
43
43
}
44
44
}
45
45
You can’t perform that action at this time.
0 commit comments