1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00

do not escape for XML characters encoded with unicode equivalents

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2111 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2003-09-28 03:11:18 +00:00 committed by gdombiak
parent d26301a65c
commit 8264ebdfb5

View file

@ -200,8 +200,16 @@ public class StringUtils {
if (i > last) {
out.append(input, last, i - last);
}
last = i + 1;
out.append(AMP_ENCODE);
// Do nothing if the string is of the form ë (unicode value)
if (!(len > i + 5
&& input[i + 1] == '#'
&& Character.isDigit(input[i + 2])
&& Character.isDigit(input[i + 3])
&& Character.isDigit(input[i + 4])
&& input[i + 5] == ';')) {
last = i + 1;
out.append(AMP_ENCODE);
}
}
else if (ch == '"') {
if (i > last) {