Fixed bug: character variable is called 'c', not 'ch'.

This commit is contained in:
hns 2002-09-13 16:26:13 +00:00
parent b6f8c5edb3
commit 9f76a1c03b

View file

@ -29,7 +29,7 @@ public final class HtmlEncoder {
static final String[] transform = {
"€", // 128
"", // empty string means character is undefined in unicode
"‚",
"‚",
"ƒ",
"„",
"…",
@ -529,7 +529,7 @@ public final class HtmlEncoder {
if (c < 0x20) {
// sort out invalid XML characters below 0x20 - all but 0x9, 0xA and 0xD.
// The trick is an adaption of java.lang.Character.isSpace().
if (((((1L << 0x9) | (1L << 0xA) | (1L << 0xD)) >> ch) & 1L) != 0)
if (((((1L << 0x9) | (1L << 0xA) | (1L << 0xD)) >> c) & 1L) != 0)
ret.append (c);
} else {
ret.append (c);