@@ -892,7 +892,7 @@ const Commands = Module("commands", {
892
892
if ( ( res = str . match ( / ^ ( ) ( (?: [ ^ \\ \s " ' ] | \\ .) + ) ( (?: \\ $ ) ? ) / ) ) )
893
893
arg += res [ 2 ] . replace ( / \\ ( .) / g, "$1" ) ;
894
894
else if ( ( res = str . match ( / ^ ( " ) ( (?: [ ^ \\ " ] | \\ .) * ) ( " ? ) / ) ) )
895
- arg += eval ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
895
+ arg += JSON . parse ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
896
896
else if ( ( res = str . match ( / ^ ( ' ) ( (?: [ ^ \\ ' ] | \\ .) * ) ( ' ? ) / ) ) )
897
897
arg += res [ 2 ] . replace ( / \\ ( .) / g, function ( n0 , n1 ) / [ \\ ' ] / . test ( n1 ) ? n1 : n0 ) ;
898
898
break ;
@@ -901,7 +901,7 @@ const Commands = Module("commands", {
901
901
if ( ( res = str . match ( / ^ ( ) ( (?: [ ^ \\ \s " ' ] | \\ .) + ) ( (?: \\ $ ) ? ) / ) ) )
902
902
arg += res [ 2 ] . replace ( / \\ ( .) / g, "$1" ) ;
903
903
else if ( ( res = str . match ( / ^ ( " ) ( (?: [ ^ \\ " ] | \\ .) * ) ( " ? ) / ) ) )
904
- arg += eval ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
904
+ arg += JSON . parse ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
905
905
else if ( ( res = str . match ( / ^ ( ' ) ( (?: [ ^ ' ] | ' ' ) * ) ( ' ? ) / ) ) )
906
906
arg += res [ 2 ] . replace ( "''" , "'" , "g" ) ;
907
907
break ;
@@ -912,7 +912,7 @@ const Commands = Module("commands", {
912
912
else if ( ( res = str . match ( / ^ ( " " " ) ( (?: .? .? [ ^ " ] ) * ) ( (?: " " " ) ? ) / ) ) )
913
913
arg += res [ 2 ] ;
914
914
else if ( ( res = str . match ( / ^ ( " ) ( (?: [ ^ \\ " ] | \\ .) * ) ( " ? ) / ) ) )
915
- arg += eval ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
915
+ arg += JSON . parse ( res [ 0 ] + ( res [ 3 ] ? "" : '"' ) ) ;
916
916
else if ( ( res = str . match ( / ^ ( ' ) ( (?: [ ^ \\ ' ] | \\ .) * ) ( ' ? ) / ) ) )
917
917
arg += res [ 2 ] . replace ( / \\ ( .) / g, function ( n0 , n1 ) / [ \\ ' ] / . test ( n1 ) ? n1 : n0 ) ;
918
918
break ;
0 commit comments