Skip to content

Commit e2a4b0b

Browse files
committed
ignoreEscape was not in the right place + better special case for one char unescape
1 parent 36ca5c4 commit e2a4b0b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

org/w3c/css/util/UnescapeFilterReader.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,17 @@ public int read(char[] cbuf, int off, int len) throws IOException {
127127
chars[j++] = (char) val;
128128
escaped = true;
129129
i += k;
130+
} else {
131+
escaped = true;
132+
ignoreEscape = true;
130133
}
131-
escaped = true;
132-
ignoreEscape = true;
133134
break;
134135
} else {
135136
if (val == 0) {
136137
if ((cki > 96 && cki < 124) || (cki > 64 && cki < 91)) {
137138
// so we found a regular char, just remove the escaping
139+
++i;
140+
ignoreEscape = true;
138141
break;
139142
}
140143
}

0 commit comments

Comments
 (0)