mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 19:23:11 +00:00
Remove formatted spaces from extra JSON before URL encoding
This commit is contained in:
parent
386209b835
commit
6ea88b9141
1 changed files with 17 additions and 1 deletions
|
|
@ -118,7 +118,23 @@ public class BaseFmt
|
|||
}
|
||||
if (item.Extra.IsNotEmpty())
|
||||
{
|
||||
dicQuery.Add("extra", Utils.UrlEncode(item.Extra));
|
||||
var extra = item.Extra;
|
||||
try
|
||||
{
|
||||
var node = JsonNode.Parse(item.Extra);
|
||||
if (node != null)
|
||||
{
|
||||
extra = node.ToJsonString(new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = false,
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||
});
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
dicQuery.Add("extra", Utils.UrlEncode(extra));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue