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 ;
1
2
using System . Text ;
2
3
using JoystickRemoteConfig . Core . Data ;
3
4
using UnityEngine ;
@@ -27,8 +28,9 @@ public static string GetConfigContentAPIUrl(string[] contentIds)
27
28
28
29
for ( int i = 0 ; i < contentIds . Length ; i ++ )
29
30
{
31
+ // Ensure each content ID is properly encoded
30
32
stringBuilder . Append ( "\" " ) ;
31
- stringBuilder . Append ( contentIds [ i ] ) ;
33
+ stringBuilder . Append ( Uri . EscapeDataString ( contentIds [ i ] ) ) ;
32
34
stringBuilder . Append ( "\" " ) ;
33
35
34
36
if ( i < contentIds . Length - 1 )
@@ -43,7 +45,10 @@ public static string GetConfigContentAPIUrl(string[] contentIds)
43
45
string responseTypeParam = "&responseType=serialized" ;
44
46
string appendParam = shouldSerialized ? responseTypeParam : string . Empty ;
45
47
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 } ";
47
52
}
48
53
49
54
public static string GetCatalogAPIUrl ( )
You can’t perform that action at this time.
0 commit comments