未验证 提交 ee5bc2a2 编写于 作者: M Martin Taillefer 提交者: GitHub

Forgot to escape JSON string output (#4280)

Co-authored-by: NMartin Taillefer <mataille@microsoft.com>
上级 7c322ade
......@@ -174,6 +174,10 @@ private void OutArray(string name, Action action)
private void OutNameValue(string name, string value)
{
value = value
.Replace("\\", "\\\\")
.Replace("\"", "\\\"");
NewItem();
OutIndent();
Out($"\"{name}\": \"{value}\"");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册