Loading CHANGES.md +27 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,11 @@ Version 1.2.24 To be released. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.2.23 -------------- Loading Loading @@ -422,6 +427,17 @@ Released on October 31, 2024. [#118]: https://github.com/dahlia/fedify/issues/118 Version 1.1.24 -------------- Released on August 25, 2025. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.1.23 -------------- Loading Loading @@ -876,6 +892,17 @@ Released on October 20, 2024. [#150]: https://github.com/dahlia/fedify/issues/150 Version 1.0.27 -------------- Released on August 25, 2025. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.0.26 -------------- Loading src/deno.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "@logtape/logtape": "jsr:@logtape/logtape@^0.7.2", "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0", "@std/assert": "jsr:@std/assert@^0.226.0", "@std/async": "jsr:@std/async@^1.0.5", "@std/async": "jsr:@std/async@1.0.5", "@std/bytes": "jsr:@std/bytes@^1.0.2", "@std/collections": "jsr:@std/collections@^1.0.6", "@std/encoding": "jsr:@std/encoding@1.0.7", Loading src/runtime/docloader.test.ts +30 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,36 @@ test("fetchDocumentLoader()", async (t) => { }); }); mf.mock("GET@/xhtml-link", (_req) => new Response( `<html> <head> <meta charset=utf-8> <link rel=alternate type="application/activity+json" href="https://example.com/object" /> </head> </html>`, { status: 200, headers: { "Content-Type": "application/xhtml+xml; charset=utf-8" }, }, )); await t.step("XHTML <link>", async () => { assertEquals(await fetchDocumentLoader("https://example.com/xhtml-link"), { contextUrl: null, documentUrl: "https://example.com/object", document: { "@context": "https://www.w3.org/ns/activitystreams", id: "https://example.com/object", name: "Fetched object", type: "Object", }, }); }); mf.mock("GET@/html-a", (_req) => new Response( `<html> Loading src/runtime/docloader.ts +2 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,8 @@ async function getRemoteDocument( contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;")) ) { const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/ig; const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/ig; const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/ig; const html = await response.text(); let m: RegExpExecArray | null; Loading Loading
CHANGES.md +27 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,11 @@ Version 1.2.24 To be released. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.2.23 -------------- Loading Loading @@ -422,6 +427,17 @@ Released on October 31, 2024. [#118]: https://github.com/dahlia/fedify/issues/118 Version 1.1.24 -------------- Released on August 25, 2025. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.1.23 -------------- Loading Loading @@ -876,6 +892,17 @@ Released on October 20, 2024. [#150]: https://github.com/dahlia/fedify/issues/150 Version 1.0.27 -------------- Released on August 25, 2025. - Fixed a bug where ActivityPub Discovery failed to recognize XHTML self-closing `<link>` tags. The HTML/XHTML parser now correctly handles whitespace before the self-closing slash (`/>`), improving compatibility with XHTML documents that follow the self-closing tag format. Version 1.0.26 -------------- Loading
src/deno.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "@logtape/logtape": "jsr:@logtape/logtape@^0.7.2", "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0", "@std/assert": "jsr:@std/assert@^0.226.0", "@std/async": "jsr:@std/async@^1.0.5", "@std/async": "jsr:@std/async@1.0.5", "@std/bytes": "jsr:@std/bytes@^1.0.2", "@std/collections": "jsr:@std/collections@^1.0.6", "@std/encoding": "jsr:@std/encoding@1.0.7", Loading
src/runtime/docloader.test.ts +30 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,36 @@ test("fetchDocumentLoader()", async (t) => { }); }); mf.mock("GET@/xhtml-link", (_req) => new Response( `<html> <head> <meta charset=utf-8> <link rel=alternate type="application/activity+json" href="https://example.com/object" /> </head> </html>`, { status: 200, headers: { "Content-Type": "application/xhtml+xml; charset=utf-8" }, }, )); await t.step("XHTML <link>", async () => { assertEquals(await fetchDocumentLoader("https://example.com/xhtml-link"), { contextUrl: null, documentUrl: "https://example.com/object", document: { "@context": "https://www.w3.org/ns/activitystreams", id: "https://example.com/object", name: "Fetched object", type: "Object", }, }); }); mf.mock("GET@/html-a", (_req) => new Response( `<html> Loading
src/runtime/docloader.ts +2 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,8 @@ async function getRemoteDocument( contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;")) ) { const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/ig; const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/ig; const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/ig; const html = await response.text(); let m: RegExpExecArray | null; Loading