diff --git a/api/remote/html.ts b/api/remote/html.ts index 5c0a8c6a..f841533a 100644 --- a/api/remote/html.ts +++ b/api/remote/html.ts @@ -159,7 +159,7 @@ const TAG_RE = /** Matches one attribute: unquoted, single- or double-quoted, or bare. */ const ATTR_RE = - /([^\s"'<>\/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g; + /([^\s"'<>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g; function parseAttrs(source: string): Attrs { const attrs: Attrs = new Map(); diff --git a/src/test/utils/feed/journalLayout.test.ts b/src/test/utils/feed/journalLayout.test.ts index 186da134..2a7e477e 100644 --- a/src/test/utils/feed/journalLayout.test.ts +++ b/src/test/utils/feed/journalLayout.test.ts @@ -66,7 +66,9 @@ describe("hasThumbnail / hasQuote", () => { expect(hasThumbnail(makeDump({ thumbnailMime: "image/webp" }))).toBe(true); expect( hasThumbnail( - makeDump({ richContent: { type: "generic", url: "u", thumbnailUrl: "t" } }), + makeDump({ + richContent: { type: "generic", url: "u", thumbnailUrl: "t" }, + }), ), ).toBe(true); expect(hasThumbnail(makeDump())).toBe(false);