Changeset 350 for trunk/JavaHelperLib/src/de
- Timestamp:
- 01/17/12 11:26:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaHelperLib/src/de/ugoe/cs/util/StringTools.java
r330 r350 41 41 public static String xmlEntityReplacement(String str) { 42 42 String result = str; 43 result = result.replaceAll("&(?!(?:lt|gt|apos|quot|amp);)", "&"); 44 result = result.replaceAll("<", "<"); 45 result = result.replaceAll(">", ">"); 46 result = result.replaceAll("'", "'"); 47 result = result.replaceAll("\"", """); 43 if (result != null && !"".equals(result)) { 44 result = result 45 .replaceAll("&(?!(?:lt|gt|apos|quot|amp);)", "&"); 46 result = result.replaceAll("<", "<"); 47 result = result.replaceAll(">", ">"); 48 result = result.replaceAll("'", "'"); 49 result = result.replaceAll("\"", """); 50 } 48 51 return result; 49 52 }
Note: See TracChangeset
for help on using the changeset viewer.