1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-12 19:02:06 +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,9 +200,17 @@ public class StringUtils {
if (i > last) {
out.append(input, last, i - last);
}
// 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) {
out.append(input, last, i - last);