mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
fixes object comparison
This commit is contained in:
parent
fb1db9341e
commit
e477d7002b
1 changed files with 3 additions and 3 deletions
6
XML.java
6
XML.java
|
@ -186,7 +186,7 @@ public class XML {
|
|||
StringBuilder sb = new StringBuilder(string.length());
|
||||
for (int i = 0, length = string.length(); i < length; i++) {
|
||||
char c = string.charAt(i);
|
||||
if (c == AMP) {
|
||||
if (c == '&') {
|
||||
final int semic = string.indexOf(';', i);
|
||||
if (semic > i) {
|
||||
final String entity = string.substring(i + 1, semic);
|
||||
|
@ -204,7 +204,7 @@ public class XML {
|
|||
if ("quot".equalsIgnoreCase(entity)) {
|
||||
sb.append('"');
|
||||
} else if ("amp".equalsIgnoreCase(entity)) {
|
||||
sb.append(AMP);
|
||||
sb.append('&');
|
||||
} else if ("apos".equalsIgnoreCase(entity)) {
|
||||
sb.append('\'');
|
||||
} else if ("lt".equalsIgnoreCase(entity)) {
|
||||
|
@ -212,7 +212,7 @@ public class XML {
|
|||
} else if ("gt".equalsIgnoreCase(entity)) {
|
||||
sb.append('>');
|
||||
} else {
|
||||
sb.append(AMP).append(entity).append(';');
|
||||
sb.append('&').append(entity).append(';');
|
||||
}
|
||||
}
|
||||
// skip past the entity we just parsed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue