diff --git a/Wox.Core/Plugin/JsonPRCModel.cs b/Wox.Core/Plugin/JsonPRCModel.cs index 480d1e386d..902d12e526 100644 --- a/Wox.Core/Plugin/JsonPRCModel.cs +++ b/Wox.Core/Plugin/JsonPRCModel.cs @@ -74,7 +74,7 @@ namespace Wox.Core.Plugin 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) { @@ -86,6 +86,13 @@ namespace Wox.Core.Plugin } return paramter.ToString(); } + + private string RepalceEscapes(string str) + { + return str.Replace(@"\", @"\\") //Escapes in ProcessStartInfo + .Replace(@"\", @"\\"); //Escapes itself when passed to client + //todo: replace " + } } ///