Unverified Commit a151b5f8 authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.4.14' into 1.5-maintenance

Fedify 1.4.14
parents 8b310277 7fef11cf
Loading
Loading
Loading
Loading
+60 −0
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@ Version 1.5.6

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.5.5
-------------
@@ -196,6 +201,17 @@ Released on March 28, 2025.
[multibase]: https://github.com/multiformats/js-multibase


Version 1.4.14
--------------

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.4.13
--------------

@@ -458,6 +474,17 @@ Released on February 5, 2025.
[#195]: https://github.com/fedify-dev/fedify/issues/195


Version 1.3.21
--------------

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.3.20
--------------

@@ -838,6 +865,17 @@ Released on November 30, 2024.
[#193]: https://github.com/fedify-dev/fedify/issues/193


Version 1.2.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.2.23
--------------

@@ -1251,6 +1289,17 @@ Released on October 31, 2024.
[#118]: https://github.com/fedify-dev/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
--------------

@@ -1705,6 +1754,17 @@ Released on October 20, 2024.
[#150]: https://github.com/fedify-dev/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
--------------

+30 −0
Original line number Diff line number Diff line
@@ -216,6 +216,36 @@ test("getDocumentLoader()", 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>
+2 −1
Original line number Diff line number Diff line
@@ -213,7 +213,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;