From 5ef585b0260eddb091915f51b3c302dfe389b143 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 6 Jul 2021 15:50:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=E4=BF=AE=E5=A4=8DJSON=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20#1004865?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/commons/json/JSONSchemaGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/commons/json/JSONSchemaGenerator.java b/backend/src/main/java/io/metersphere/commons/json/JSONSchemaGenerator.java index 998a833ad7..fe04a92d64 100644 --- a/backend/src/main/java/io/metersphere/commons/json/JSONSchemaGenerator.java +++ b/backend/src/main/java/io/metersphere/commons/json/JSONSchemaGenerator.java @@ -323,7 +323,7 @@ public class JSONSchemaGenerator { JSONObject root = new JSONObject(); generator(jsonSchema, root); // 格式化返回 - Gson gson = new GsonBuilder().serializeNulls().setPrettyPrinting().create(); + Gson gson = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping().create(); if (root.get("MS-OBJECT") != null) { return gson.toJson(root.get("MS-OBJECT")); }