Create components to respond to client request #200
+3
-2
@@ -49,8 +49,9 @@ public class ResponseEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String maskIfNeeded(String value) {
|
private static String maskIfNeeded(String value) {
|
||||||
if (value.contains(" ")) {
|
if (value.contains(" ") || value.contains("'")) {
|
||||||
return "'" + value + "'";
|
String escaped = value.replace("'", "\\'");
|
||||||
|
return "'" + escaped + "'";
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user