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) {
1414    out ( `RESULT: ${ result }  ) ; 
1515  }  else  { 
1616    let  doFetch  =  typeof  origFetch  !=  'undefined'  ? origFetch  : fetch ; 
17-     doFetch ( `http://localhost:${ port } ${ result }  ) . then ( ( )  =>  { 
17+     doFetch ( `http://localhost:${ port } ${ encodeURIComponent ( result ) }  ) . then ( ( )  =>  { 
1818      if  ( typeof  window  ===  'object'  &&  window  &&  hasModule  &&  ! Module [ 'pageThrewException' ] )  { 
1919        /* for easy debugging, don't close window on failure */ 
2020        window . close ( ) ; 
@@ -24,7 +24,7 @@ function reportResultToServer(result, port) {
2424} 
2525
2626function  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 } ) ; 
2828} 
2929
3030/** 
@@ -39,7 +39,7 @@ function reportErrorToServer(message) {
3939  if  ( typeof  ENVIRONMENT_IS_NODE  !==  'undefined'  &&  ENVIRONMENT_IS_NODE )  { 
4040    err ( message ) ; 
4141  }  else  { 
42-     fetch ( encodeURI ( `http://localhost:8888?stderr=${ message } `  ) ) ; 
42+     fetch ( `http://localhost:8888?stderr=${ encodeURIComponent ( message ) } `  ) ; 
4343  } 
4444} 
4545
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments