File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Runtime/Scripts/Core/Utilities Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ using System ;
12using System . Text ;
23using JoystickRemoteConfig . Core . Data ;
34using UnityEngine ;
@@ -27,8 +28,9 @@ public static string GetConfigContentAPIUrl(string[] contentIds)
2728
2829 for ( int i = 0 ; i < contentIds . Length ; i ++ )
2930 {
31+ // Ensure each content ID is properly encoded
3032 stringBuilder . Append ( "\" " ) ;
31- stringBuilder . Append ( contentIds [ i ] ) ;
33+ stringBuilder . Append ( Uri . EscapeDataString ( contentIds [ i ] ) ) ;
3234 stringBuilder . Append ( "\" " ) ;
3335
3436 if ( i < contentIds . Length - 1 )
@@ -43,7 +45,10 @@ public static string GetConfigContentAPIUrl(string[] contentIds)
4345 string responseTypeParam = "&responseType=serialized" ;
4446 string appendParam = shouldSerialized ? responseTypeParam : string . Empty ;
4547
46- return $ "https://api.getjoystick.com/api/v1/combine/?c=[{ stringBuilder } ]&dynamic=true{ appendParam } ";
48+ // Properly encode the entire 'c=[...]' query parameter
49+ string encodedCParameter = Uri . EscapeDataString ( $ "[{ stringBuilder } ]") ;
50+
51+ return $ "https://api.getjoystick.com/api/v1/combine/?c={ encodedCParameter } &dynamic=true{ appendParam } ";
4752 }
4853
4954 public static string GetCatalogAPIUrl ( )
You can’t perform that action at this time.
0 commit comments