Context: Forge M10 renders issue/comment Markdown. VoidLibrary has no Markdown parser and no HTML escaper (Void/Text/Html.hpp exists but was not confirmed to provide escaping), so Forge must own a bounded CommonMark subset.
Need (optional, reusable): a bounded CommonMark-subset parser and a safe HTML renderer that escapes by default and allow-lists constructs (no raw HTML), plus an HTML escape helper if Text/Html.hpp lacks one.
Tests/gate: CommonMark examples for the supported subset, hostile input (script tags, javascript: links, nested/malformed constructs), and strict input/output bounds. Forge proceeds with a Forge-side implementation until this lands.
Context: Forge M10 renders issue/comment Markdown. VoidLibrary has no Markdown parser and no HTML escaper (`Void/Text/Html.hpp` exists but was not confirmed to provide escaping), so Forge must own a bounded CommonMark subset.
Need (optional, reusable): a bounded CommonMark-subset parser and a safe HTML renderer that escapes by default and allow-lists constructs (no raw HTML), plus an HTML escape helper if `Text/Html.hpp` lacks one.
Tests/gate: CommonMark examples for the supported subset, hostile input (script tags, javascript: links, nested/malformed constructs), and strict input/output bounds. Forge proceeds with a Forge-side implementation until this lands.
Raw HTML is never passed through (always escaped). Link/image destinations are allow-listed (http/https/mailto or relative); javascript:, data:, vbscript: and entity-smuggled variants are dropped to their label text.
Void/Text/Html.hpp gained html_escape (it previously only had html_unescape).
Tests: tests/standalone/Text/Markdown.cpp (CommonMark examples for the supported subset, hostile input, and all four limits) plus html_escape cases in Text/Encoding.cpp. Text+Testing suite: 596 tests, 593 passed, 3 skipped, 0 failed.
Implemented in 549c7cf on `main`.
- `Void/Text/Markdown.hpp`: bounded CommonMark-subset parser + safe HTML renderer. Blocks: ATX/setext headings, paragraphs, fenced code, thematic breaks, block quotes, bullet/ordered lists. Inline: emphasis/strong, code spans, links, images, autolinks, escapes, hard breaks.
- Raw HTML is never passed through (always escaped). Link/image destinations are allow-listed (http/https/mailto or relative); `javascript:`, `data:`, `vbscript:` and entity-smuggled variants are dropped to their label text.
- `MarkdownLimits` bounds input size, output size, block count and nesting depth.
- `Void/Text/Html.hpp` gained `html_escape` (it previously only had `html_unescape`).
- Tests: `tests/standalone/Text/Markdown.cpp` (CommonMark examples for the supported subset, hostile input, and all four limits) plus `html_escape` cases in `Text/Encoding.cpp`. Text+Testing suite: 596 tests, 593 passed, 3 skipped, 0 failed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context: Forge M10 renders issue/comment Markdown. VoidLibrary has no Markdown parser and no HTML escaper (
Void/Text/Html.hppexists but was not confirmed to provide escaping), so Forge must own a bounded CommonMark subset.Need (optional, reusable): a bounded CommonMark-subset parser and a safe HTML renderer that escapes by default and allow-lists constructs (no raw HTML), plus an HTML escape helper if
Text/Html.hpplacks one.Tests/gate: CommonMark examples for the supported subset, hostile input (script tags, javascript: links, nested/malformed constructs), and strict input/output bounds. Forge proceeds with a Forge-side implementation until this lands.
Implemented in
549c7cfonmain.Void/Text/Markdown.hpp: bounded CommonMark-subset parser + safe HTML renderer. Blocks: ATX/setext headings, paragraphs, fenced code, thematic breaks, block quotes, bullet/ordered lists. Inline: emphasis/strong, code spans, links, images, autolinks, escapes, hard breaks.javascript:,data:,vbscript:and entity-smuggled variants are dropped to their label text.MarkdownLimitsbounds input size, output size, block count and nesting depth.Void/Text/Html.hppgainedhtml_escape(it previously only hadhtml_unescape).tests/standalone/Text/Markdown.cpp(CommonMark examples for the supported subset, hostile input, and all four limits) plushtml_escapecases inText/Encoding.cpp. Text+Testing suite: 596 tests, 593 passed, 3 skipped, 0 failed.