File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -83,22 +83,25 @@ const SurveyView: (Props: Props) => JSX.Element = ({
8383        continue ; 
8484      } 
8585
86+       const  encodedTrait  =  encodeURIComponent ( trait ) ; 
8687      const  value  =  encodeURIComponent ( rawValue . toString ( ) ) ; 
8788
8889      if  ( typeof  traits [ trait ]  ===  'boolean' )  { 
89-         params . push ( `response_boolean_${ trait } ${ value }  ) ; 
90+         params . push ( `response_boolean_${ encodedTrait } ${ value }  ) ; 
9091      }  else  if  ( typeof  traits [ trait ]  ===  'number' )  { 
91-         params . push ( `response_number_${ trait } ${ value }  ) ; 
92+         params . push ( `response_number_${ encodedTrait } ${ value }  ) ; 
9293      }  else  if  ( 
9394        typeof  traits [ trait ]  ===  'object'  && 
9495        Object . prototype . toString . call ( traits [ trait ] )  ===  '[object Date]'  && 
9596        ! isNaN ( ( traits [ trait ]  as  Date ) . getTime ( ) ) 
9697      )  { 
9798        params . push ( 
98-           `response_date_${ trait } ${ ( traits [ trait ]  as  Date ) . getTime ( )  /  1000 }  
99+           `response_date_${ encodedTrait } ${  
100+             ( traits [ trait ]  as  Date ) . getTime ( )  /  1000  
101+           }  `
99102        ) ; 
100103      }  else  { 
101-         params . push ( `response_${ trait } ${ value }  ) ; 
104+         params . push ( `response_${ encodedTrait } ${ value }  ) ; 
102105      } 
103106    } 
104107  } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments