Skip to content

Commit

Permalink
[Fix] json字符串支持\n\n\u4f60
Browse files Browse the repository at this point in the history
  • Loading branch information
luanqian authored and luanqian committed Nov 1, 2016
1 parent edb575b commit 7b3a80f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 7b3a80f

Please sign in to comment.