This commit is contained in:
Austin Huang 2020-12-27 22:36:36 -05:00
parent 82885102d9
commit f3d6566332
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
1 changed files with 3 additions and 3 deletions

View File

@ -161,7 +161,7 @@ public class DirectThreadBroadcaster extends AsyncTask<DirectThreadBroadcaster.B
public TextBroadcastOptions(String text) throws UnsupportedEncodingException { public TextBroadcastOptions(String text) throws UnsupportedEncodingException {
super(ItemType.TEXT); super(ItemType.TEXT);
this.text = URLEncoder.encode(text, "UTF-8") this.text = URLEncoder.encode(text, "UTF-8")
.replaceAll("\\+", "%20").replaceAll("%21", "!").replaceAll("%27", "'") .replaceAll("\\+", "%20").replaceAll("%21", "!").replaceAll("%27", "'").replaceAll("%22", "\\\"")
.replaceAll("%28", "(").replaceAll("%29", ")").replaceAll("%7E", "~").replaceAll("%0A", "\n"); .replaceAll("%28", "(").replaceAll("%29", ")").replaceAll("%7E", "~").replaceAll("%0A", "\n");
} }
@ -234,8 +234,8 @@ public class DirectThreadBroadcaster extends AsyncTask<DirectThreadBroadcaster.B
} }
public static class DirectThreadBroadcastResponse { public static class DirectThreadBroadcastResponse {
private int responseCode; private final int responseCode;
private JSONObject response; private final JSONObject response;
public DirectThreadBroadcastResponse(int responseCode, JSONObject response) { public DirectThreadBroadcastResponse(int responseCode, JSONObject response) {
this.responseCode = responseCode; this.responseCode = responseCode;