(int codepoint)
| 123 | } |
| 124 | |
| 125 | private boolean mustEscapeCharInJsString(int codepoint) { |
| 126 | if (!Character.isSupplementaryCodePoint(codepoint)) { |
| 127 | char c = (char) codepoint; |
| 128 | return JS_ESCAPE_CHARS.contains(c) |
| 129 | || (escapeHtmlCharacters && HTML_ESCAPE_CHARS.contains(c)); |
| 130 | } |
| 131 | return false; |
| 132 | } |
| 133 | |
| 134 | private static boolean isControlCharacter(int codePoint) { |
| 135 | // JSON spec defines these code points as control characters, so they must be escaped |
no test coverage detected