Skip to content

Commit

Permalink
#12 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Apr 11, 2014
1 parent a24ac0d commit 469daf7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/jcabi/http/response/JsonResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
public final class JsonResponse extends AbstractResponse {

/**
* Pattern matching control characters U+0000 - U001F for JSON escaping.
* Pattern matching non-ASCII characters, to escape them before parsing.
*/
private static final Pattern CONTROL = Pattern.compile("[\u0000-\u001f]");
private static final Pattern CONTROL = Pattern.compile(
"[\u0000-\u0008\u000e-\u001f\u007f-\uffff]"
);

/**
* Public ctor.
Expand Down

0 comments on commit 469daf7

Please sign in to comment.