mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix #249, replace escapes before sending json rpc request to plugin [WIP]
This commit is contained in:
parent
12265def19
commit
7e11c319e7
1 changed files with 8 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ namespace Wox.Core.Plugin
|
||||||
|
|
||||||
if (paramter is string)
|
if (paramter is string)
|
||||||
{
|
{
|
||||||
return string.Format(@"\""{0}\""", paramter);
|
return string.Format(@"\""{0}\""", RepalceEscapes(paramter.ToString()));
|
||||||
}
|
}
|
||||||
if (paramter is int || paramter is float || paramter is double)
|
if (paramter is int || paramter is float || paramter is double)
|
||||||
{
|
{
|
||||||
|
|
@ -86,6 +86,13 @@ namespace Wox.Core.Plugin
|
||||||
}
|
}
|
||||||
return paramter.ToString();
|
return paramter.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string RepalceEscapes(string str)
|
||||||
|
{
|
||||||
|
return str.Replace(@"\", @"\\") //Escapes in ProcessStartInfo
|
||||||
|
.Replace(@"\", @"\\"); //Escapes itself when passed to client
|
||||||
|
//todo: replace "
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue