Unverified Commit 72266a61 authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.6.9' into 1.7-maintenance

Fedify 1.6.9
parents c9c5b9eb 6beebf75
Loading
Loading
Loading
Loading
+82 −0
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@ Version 1.7.10

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.7.9
-------------
@@ -146,6 +151,17 @@ Released on June 25, 2025.
[#252]: https://github.com/fedify-dev/fedify/pull/252


Version 1.6.9
-------------

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

@@ -287,6 +303,17 @@ the versioning.
[#242]: https://github.com/fedify-dev/fedify/pull/242


Version 1.5.6
-------------

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

@@ -474,6 +501,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
--------------

@@ -736,6 +774,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
--------------

@@ -1116,6 +1165,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
--------------

@@ -1529,6 +1589,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
--------------

@@ -1983,6 +2054,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
--------------

+26 −0
Original line number Diff line number Diff line
@@ -189,6 +189,32 @@ test("getDocumentLoader()", async (t) => {
    });
  });

  fetchMock.get("https://example.com/xhtml-link", {
    body: `<html>
        <head>
          <meta charset="utf-8" />
          <link
            rel=alternate
            type="application/activity+json"
            href="https://example.com/object" />
        </head>
      </html>`,
    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",
      },
    });
  });

  fetchMock.get("https://example.com/html-a", {
    body: `<html>
        <head>
+2 −1
Original line number Diff line number Diff line
@@ -235,7 +235,8 @@ export 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;