toshi 2005/02/15 02:15:43
Modified: java/src/org/apache/axis/utils StringUtils.java
Log:
Changed the logic to check the delimiter - ';'.
Revision Changes Path
1.9 +2 -7 ws-axis/java/src/org/apache/axis/utils/StringUtils.java
Index: StringUtils.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/StringUtils.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StringUtils.java 15 Feb 2005 09:36:51 -0000 1.8
+++ StringUtils.java 15 Feb 2005 10:15:43 -0000 1.9
@@ -368,7 +368,7 @@
// if in unicode, then we're reading unicode
// values in somehow
unicode.append(ch);
- if (unicode.length() == 4 && str.charAt(i+1) == ';') {
+ if (unicode.length() == 4) {
// unicode now contains the four hex digits
// which represents our unicode character
try {
@@ -381,11 +381,6 @@
} catch (NumberFormatException nfe) {
throw new InternalException(nfe);
}
- } else if (unicode.length() == 4) {
- // can't find the delimiter ';', thus it's an invalid
unicode
- out.write(unicode.toString());
- unicode.setLength(0);
- inUnicode = false;
}
continue;
} else if (ch=='&') {
@@ -396,7 +391,7 @@
escapes.append(ch);
escapes.append(str.charAt(i+1));
escapes.append(str.charAt(i+2));
- if (escapes.toString().equals("&#x")) {
+ if (escapes.toString().equals("&#x") &&
str.charAt(i+7)==';') {
inUnicode = true;
} else {
out.write(escapes.toString());