mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-25 17:22:52 +00:00
Remove formatted spaces from extra JSON before URL encoding (#8385)
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
This commit is contained in:
parent
386209b835
commit
9ffa6a4eb6
1 changed files with 17 additions and 1 deletions
|
|
@ -118,7 +118,23 @@ public class BaseFmt
|
||||||
}
|
}
|
||||||
if (item.Extra.IsNotEmpty())
|
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;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue