Entity references have their ampersand (&) improperly
translated into &
E.g. String property with value
"ABCC"
will be written into XML as:
<property>ABC&amp;#67</property>
which is not right.
One possible fix is:
com.jxml.quick.QExpressFactory
124,132d123
< else if (k==2) {
< if (i < l - 1 && t.charAt(i+1)
== '#') {
< b.append(s);
< } else {
< b.append(E[k]);
< }
< }
--
Best regards,
Martin Mavrov
Logged In: YES
user_id=344902
I admit that the patch was short-sighted. Here is a more
complete version:
else if (k==2) {
int length = t.length();
if (
i >= length - 3 // can't hold "&#;"
|| t.charAt(i + 1)!= '#') // isn't #
{
b.append(E[k]);
continue;
}
int j = i + 2;
boolean hexMode = false;
char ch = t.charAt(j);
if (ch == 'x') {
hexMode = true;
j++;
}
while (
j < length
&& (ch = t.charAt(j)) != ';'
&& (hexMode ?
("0123456789ABCDEFabcdef".indexOf(ch) != -1) :
("0123456789".indexOf(ch) !
= -1)
)
)
{
j++;
}
if (
j < length
&& j > (i + 2 + (hexMode? 1 : 0))
&& ch == ';'
) {
b.append(t.substring(i, j + 1)); //
incl/excl
i = j;
} else {
b.append(E[k]);
}
}