Skip to content

Commit 1c07956

Browse files
committed
Adding lost quotes in json format (RC). Fixes issue 7018
1 parent bfd3cce commit 1c07956

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Diff for: java/server/src/org/openqa/selenium/server/commands/CaptureNetworkTrafficCommand.java

+4-10
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,18 @@ private String jsonKey(final String key) {
207207
}
208208

209209
private Object json(String s) {
210-
return escape(s);
211-
}
212-
213-
// -------------- Copied from JSONValue -------------------
214-
/**
215-
* Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
216-
* @param s
217-
* @return
218-
*/
219-
private static String escape(String s){
220210
if(s==null)
221211
return null;
222212
StringBuffer sb = new StringBuffer();
213+
sb.append("\"");
223214
escape(s, sb);
215+
sb.append("\"");
224216
return sb.toString();
225217
}
226218

219+
// -------------- Copied from JSONValue -------------------
227220
/**
221+
* Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
228222
* @param s - Must not be null.
229223
* @param sb
230224
*/

0 commit comments

Comments
 (0)