Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { renderSanitizedMarkdown, sanitizeIconSvg, sanitizeMarkedHtml } from "./html-sanitizer";
|
||||
import { renderSanitizedChatMarkdown, renderSanitizedMarkdown, sanitizeIconSvg, sanitizeMarkedHtml } from "./html-sanitizer";
|
||||
|
||||
describe("html sanitizer", () => {
|
||||
it("removes active HTML and unsafe URLs from marked output", () => {
|
||||
@@ -43,6 +43,14 @@ describe("html sanitizer", () => {
|
||||
expect(renderSanitizedMarkdown("**bold**")).toContain("<strong>bold</strong>");
|
||||
});
|
||||
|
||||
it("renders chat links but never loads markdown images outside the Files pipeline", () => {
|
||||
const html = renderSanitizedChatMarkdown(" [Dokument](https://example.com/doc)");
|
||||
|
||||
expect(html).not.toMatch(/<img|evil\.example/i);
|
||||
expect(html).toContain("Tracking <& pixel");
|
||||
expect(html).toContain('href="https://example.com/doc"');
|
||||
});
|
||||
|
||||
describe("server string fallback (no DOMParser)", () => {
|
||||
const originalDomParser = globalThis.DOMParser;
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in new issue
Block a user