|
|
@ -183,6 +183,7 @@ public class XMLEntityReaderImpl extends XMLEntityReader { |
|
|
|
validContent[i]=true; |
|
|
|
validContent[i]=true; |
|
|
|
} |
|
|
|
} |
|
|
|
validContent[0x9]=true; |
|
|
|
validContent[0x9]=true; |
|
|
|
|
|
|
|
validContent[0xA]=true; |
|
|
|
validContent[0x26]=false; |
|
|
|
validContent[0x26]=false; |
|
|
|
validContent[0x3C]=false; |
|
|
|
validContent[0x3C]=false; |
|
|
|
validContent[0x5D]=false; |
|
|
|
validContent[0x5D]=false; |
|
|
@ -1353,6 +1354,27 @@ public class XMLEntityReaderImpl extends XMLEntityReader { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (XMLChar.isInvalid(c)) { |
|
|
|
else if (XMLChar.isInvalid(c)) { |
|
|
|
|
|
|
|
if(XMLChar.isHighSurrogate(c)){ |
|
|
|
|
|
|
|
fCurrentEntity.position--; |
|
|
|
|
|
|
|
if (fCurrentEntity.position - offset > 0){ |
|
|
|
|
|
|
|
int length = fCurrentEntity.position - offset; |
|
|
|
|
|
|
|
fCurrentEntity.columnNumber += length - newlines; |
|
|
|
|
|
|
|
buffer.append(fCurrentEntity.ch, offset, length); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int high = this.scanChar(); |
|
|
|
|
|
|
|
int low = this.peekChar(); |
|
|
|
|
|
|
|
if (!XMLChar.isLowSurrogate(low)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int x = XMLChar.supplemental((char)high, (char)low); |
|
|
|
|
|
|
|
if (isInvalid(x)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
buffer.append((char)high); |
|
|
|
|
|
|
|
buffer.append((char)low); |
|
|
|
|
|
|
|
offset = ++fCurrentEntity.position; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
fCurrentEntity.position--; |
|
|
|
fCurrentEntity.position--; |
|
|
|
int length = fCurrentEntity.position - offset; |
|
|
|
int length = fCurrentEntity.position - offset; |
|
|
|
fCurrentEntity.columnNumber += length - newlines; |
|
|
|
fCurrentEntity.columnNumber += length - newlines; |
|
|
@ -1361,12 +1383,13 @@ public class XMLEntityReaderImpl extends XMLEntityReader { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
int length = fCurrentEntity.position - offset; |
|
|
|
int length = fCurrentEntity.position - offset; |
|
|
|
fCurrentEntity.columnNumber += length - newlines; |
|
|
|
if (length != 0){ |
|
|
|
if (done) { |
|
|
|
fCurrentEntity.columnNumber += length - newlines; |
|
|
|
length -= delimLen; |
|
|
|
if (done) { |
|
|
|
|
|
|
|
length -= delimLen; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
buffer.append(fCurrentEntity.ch, offset, length); |
|
|
|
} |
|
|
|
} |
|
|
|
buffer.append(fCurrentEntity.ch, offset, length); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return true if string was skipped
|
|
|
|
// return true if string was skipped
|
|
|
|
if (DEBUG_BUFFER) { |
|
|
|
if (DEBUG_BUFFER) { |
|
|
|
System.out.print(")scanData: "); |
|
|
|
System.out.print(")scanData: "); |
|
|
|