From 4d9aced5a4ecc989c5d321a530dda9ac23a384ef Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Sat, 27 Mar 2021 19:01:49 -0400 Subject: [PATCH] Gson display to not escape HTML character like "=" --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt index be6d0bb1..5cdaf5d9 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt @@ -394,6 +394,7 @@ data class V2rayConfig( fun toPrettyPrinting(): String { return GsonBuilder() .setPrettyPrinting() + .disableHtmlEscaping() .registerTypeAdapter( // custom serialiser is needed here since JSON by default parse number as Double, core will fail to start object : TypeToken() {}.type, JsonSerializer { src: Double?, _: Type?, _: JsonSerializationContext? -> JsonPrimitive(src?.toInt()) }