joshuapsteele commented on code in PR #707: URL: https://github.com/apache/directory-scimple/pull/707#discussion_r1900413645
########## scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/filter/AttributeComparisonExpression.java: ########## @@ -88,14 +86,7 @@ private String createCompareValueString() { if (this.compareValue == null) { compareValueString = "null"; } else if (this.compareValue instanceof String) { - // TODO change this to escapeJson() when dependencies get upgraded - String escaped = StringEscapeUtils.escapeEcmaScript((String) this.compareValue) - // StringEscapeUtils follows the outdated JSON spec requiring "/" to be escaped, this could subtly break things - .replaceAll("\\\\/", "/") - // We don't want single-quotes escaped, this will be unnecessary with escapeJson() - .replaceAll("\\\\'", "'"); Review Comment: Sorry, just now giving this a quick look, @bdemers. Can we note for posterity, even if just in this PR convo, where `escapeJson()` is now being used? ########## scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/filter/ExpressionBuildingListener.java: ########## @@ -160,14 +154,8 @@ public FilterExpression getFilterExpression() { private static Object parseJsonType(String jsonValue) { if (jsonValue.startsWith("\"")) { - String doubleEscaped = jsonValue.substring(1, jsonValue.length() - 1) - // StringEscapeUtils follows the outdated JSON spec requiring "/" to be escaped, this could subtly break things - .replaceAll("\\\\/", "\\\\\\\\/") - // Just in case someone needs a single-quote with a backslash in front of it, this will be unnecessary with escapeJson() - .replaceAll("\\\\'", "\\\\\\\\'"); - - // TODO change this to escapeJson() when dependencies get upgraded - return StringEscapeUtils.unescapeEcmaScript(doubleEscaped); Review Comment: @bdemers Can we note for posterity, even if just in this PR convo, where `escapeJson()` is now being used? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org For additional commands, e-mail: dev-h...@directory.apache.org