mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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:
parent
d26301a65c
commit
8264ebdfb5
1 changed files with 10 additions and 2 deletions
|
@ -200,8 +200,16 @@ public class StringUtils {
|
||||||
if (i > last) {
|
if (i > last) {
|
||||||
out.append(input, last, i - last);
|
out.append(input, last, i - last);
|
||||||
}
|
}
|
||||||
last = i + 1;
|
// Do nothing if the string is of the form ë (unicode value)
|
||||||
out.append(AMP_ENCODE);
|
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 == '"') {
|
else if (ch == '"') {
|
||||||
if (i > last) {
|
if (i > last) {
|
||||||
|
|
Loading…
Reference in a new issue