We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b349edf commit 3b0d48bCopy full SHA for 3b0d48b
src/decode.spec.ts
@@ -39,4 +39,7 @@ describe("Decode test", () => {
39
40
it("should not parse numeric entities in strict mode", () =>
41
expect(entities.decodeHTMLStrict("7")).toBe("7"));
42
+
43
+ it("should parse   followed by < (#852)", () =>
44
+ expect(entities.decodeHTML(" <")).toBe("\u00a0<"));
45
});
src/decode.ts
@@ -150,7 +150,7 @@ export function determineBranch(
150
if (jumpOffset) {
151
const value = char - jumpOffset;
152
153
- return value < 0 || value > branchCount
+ return value < 0 || value >= branchCount
154
? -1
155
: decodeTree[nodeIdx + value] - 1;
156
}
0 commit comments