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) {
186186 StringBuilder sb = new StringBuilder (string .length ());
187187 for (int i = 0 , length = string .length (); i < length ; i ++) {
188188 char c = string .charAt (i );
189- if (c == AMP ) {
189+ if (c == '&' ) {
190190 final int semic = string .indexOf (';' , i );
191191 if (semic > i ) {
192192 final String entity = string .substring (i + 1 , semic );
@@ -204,15 +204,15 @@ public static String unescape(String string) {
204204 if ("quot" .equalsIgnoreCase (entity )) {
205205 sb .append ('"' );
206206 } else if ("amp" .equalsIgnoreCase (entity )) {
207- sb .append (AMP );
207+ sb .append ('&' );
208208 } else if ("apos" .equalsIgnoreCase (entity )) {
209209 sb .append ('\'' );
210210 } else if ("lt" .equalsIgnoreCase (entity )) {
211211 sb .append ('<' );
212212 } else if ("gt" .equalsIgnoreCase (entity )) {
213213 sb .append ('>' );
214214 } else {
215- sb .append (AMP ).append (entity ).append (';' );
215+ sb .append ('&' ).append (entity ).append (';' );
216216 }
217217 }
218218 // skip past the entity we just parsed.
You can’t perform that action at this time.
0 commit comments