File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ public static String unescape(String string) {
186
186
StringBuilder sb = new StringBuilder (string .length ());
187
187
for (int i = 0 , length = string .length (); i < length ; i ++) {
188
188
char c = string .charAt (i );
189
- if (c == AMP ) {
189
+ if (c == '&' ) {
190
190
final int semic = string .indexOf (';' , i );
191
191
if (semic > i ) {
192
192
final String entity = string .substring (i + 1 , semic );
@@ -204,15 +204,15 @@ public static String unescape(String string) {
204
204
if ("quot" .equalsIgnoreCase (entity )) {
205
205
sb .append ('"' );
206
206
} else if ("amp" .equalsIgnoreCase (entity )) {
207
- sb .append (AMP );
207
+ sb .append ('&' );
208
208
} else if ("apos" .equalsIgnoreCase (entity )) {
209
209
sb .append ('\'' );
210
210
} else if ("lt" .equalsIgnoreCase (entity )) {
211
211
sb .append ('<' );
212
212
} else if ("gt" .equalsIgnoreCase (entity )) {
213
213
sb .append ('>' );
214
214
} else {
215
- sb .append (AMP ).append (entity ).append (';' );
215
+ sb .append ('&' ).append (entity ).append (';' );
216
216
}
217
217
}
218
218
// skip past the entity we just parsed.
You can’t perform that action at this time.
0 commit comments