Commit 2f9859f2 authored by Hiro's avatar Hiro 🏄
Browse files

Make that contact field does not contain strange characters that break the service

parent 6e404499
Pipeline #39005 failed with stage
in 1 minute and 43 seconds
......@@ -423,6 +423,9 @@ public class DetailsDocument extends Document {
private String contact;
public void setContact(String contact) {
if ((contact != null) && (contact.indexOf('%') != -1)) {
contact = contact.replace("%", "%%");
}
this.contact = escapeJson(contact);
}
......
......@@ -128,6 +128,9 @@ public class DetailsStatus extends Document {
private String contact;
public void setContact(String contact) {
if ((contact != null) && (contact.indexOf('%') != -1)) {
contact = contact.replace("%", "%%");
}
this.contact = escapeJson(contact);
}
......
......@@ -180,9 +180,6 @@ public class ResponseBuilder {
}
private void write(PrintWriter pw, String format, Object ... args) {
if (format.indexOf('%') != -1) {
format = format.replace("%", "%%");
}
String stringToWrite = String.format(format, args);
this.charsWritten += stringToWrite.length();
pw.write(stringToWrite);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment