From 7b3a80f53e70d1aa745e3003cc5c16cf6cd874f2 Mon Sep 17 00:00:00 2001 From: luanqian Date: Tue, 1 Nov 2016 14:17:25 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20json=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E6=94=AF=E6=8C=81\n\n\u4f60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/java/com/douban/rexxar/view/RexxarWebView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/com/douban/rexxar/view/RexxarWebView.java b/core/src/main/java/com/douban/rexxar/view/RexxarWebView.java index e6bb9d1..0ad0158 100644 --- a/core/src/main/java/com/douban/rexxar/view/RexxarWebView.java +++ b/core/src/main/java/com/douban/rexxar/view/RexxarWebView.java @@ -331,6 +331,7 @@ public void callFunction(String functionName, String jsonString) { mCore.loadUrl(String.format(Constants.FUNC_FORMAT, functionName)); } else { jsonString = jsonString.replaceAll("(\\\\)([^utrn])", "\\\\\\\\$1$2"); + jsonString = jsonString.replaceAll("(\\\\)([utrn])", "\\\\$1$2"); jsonString = jsonString.replaceAll("(?<=[^\\\\])(\")", "\\\\\""); mCore.loadUrl(String.format(Constants.FUNC_FORMAT_WITH_PARAMETERS, functionName, jsonString)); }