Changeset 10137 in josm for trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
- Timestamp:
- 2016-04-10T23:53:54+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r9970 r10137 30 30 * @see <a href="http://www.w3.org/TR/html401/charset.html#h-5.3">HTML 4.01 Character References</a> 31 31 * @see <a href="http://www.w3.org/TR/html401/charset.html#code-position">HTML 4.01 Code positions</a> 32 * @since 3669 32 33 */ 33 34 public final class Entities { … … 340 341 } 341 342 343 /** 344 * Returns unescaped entity representation. 345 * @param str entity 346 * @return unescaped entity representation 347 */ 342 348 public static String unescape(String str) { 343 349 int firstAmp = str.indexOf('&'); … … 357 363 int amphersandIdx = str.indexOf('&', i + 1); 358 364 if (amphersandIdx != -1 && amphersandIdx < semiColonIdx) { 359 // Then the text looks like &...&...;365 // Then the text looks like "&...&...;" 360 366 res.append(c); 361 367 continue; … … 365 371 int entityContentLen = entityContent.length(); 366 372 if (entityContentLen > 0) { 367 if (entityContent.charAt(0) == '#') { // escaped value content is an integer (decimal or 368 // hexidecimal) 373 if (entityContent.charAt(0) == '#') { // escaped value content is an integer (decimal or hexidecimal) 369 374 if (entityContentLen > 1) { 370 375 char isHexChar = entityContent.charAt(1);
Note:
See TracChangeset
for help on using the changeset viewer.