mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 07:32:58 +01:00
Answer prose round 1: 0 🔴, 1 🟡 (0 misread); the decision's premise named, its claims split
This commit is contained in:
@@ -150,7 +150,7 @@ const page: AdfDocument = {
|
|||||||
version: 1,
|
version: 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
// URLs are written as the ADF holds them, javascript: included: sanitize HTML from an author you do not trust before showing it.
|
// Sanitize HTML from an author you do not trust before showing it: URLs are written as the ADF holds them, javascript: included.
|
||||||
const html = adfToHtml(page)
|
const html = adfToHtml(page)
|
||||||
if (html.ok) console.log(html.value)
|
if (html.ok) console.log(html.value)
|
||||||
// <h2 data-local-id="a1f3">Release notes</h2>
|
// <h2 data-local-id="a1f3">Release notes</h2>
|
||||||
|
|||||||
+9
-8
@@ -840,19 +840,20 @@ that, JavaScriptCore throws `Out of memory`, which is `engine-limit` (§Which co
|
|||||||
|
|
||||||
## HTML writes a URL as the ADF holds it, whatever its scheme
|
## HTML writes a URL as the ADF holds it, whatever its scheme
|
||||||
|
|
||||||
2026-10-23, the maintainer; weighed against a filter 2026-10-26. Goal 1. Valid until a security
|
2026-10-23, the maintainer; kept over a scheme filter 2026-10-26. Goal 1. Valid until the maintainer
|
||||||
addition filters schemes.
|
adds scheme filtering.
|
||||||
|
|
||||||
`adfToHtml` writes every URL exactly as the ADF holds it, escaped as every attribute value is,
|
`adfToHtml` writes every URL exactly as the ADF holds it, escaped as every attribute value is,
|
||||||
`javascript:`, `vbscript:`, `file:` and `data:` included. That covers a link's `href`, an image's
|
`javascript:`, `vbscript:`, `file:` and `data:` included. That covers a link's `href`, an image's
|
||||||
`src`, and the `href` of each link the carry element shows: a carried node's link mark, a card's
|
`src`, and the `href` of each link the carry element shows: a carried node's link mark, a card's
|
||||||
`url` or `data.url`, and an external image's `url`. The markdown writers do the same.
|
`url` or `data.url`, and an external image's `url`. The markdown writers don't filter schemes
|
||||||
|
either.
|
||||||
|
|
||||||
Keeping such a URL out of the visible HTML, in `data-adf` alone, as cmark does by default, was
|
cmark leaves such a URL out of its HTML by default. Keeping it out of the visible HTML here, in
|
||||||
weighed and not taken: it would make the carry show a link without its target, make `htmlToAdf`
|
`data-adf` alone, was weighed and not taken: it would make the carry show a link without its
|
||||||
restore the URL from `data-adf`, and need a scheme list the library keeps current. Sanitizing HTML
|
target, make `htmlToAdf` restore the URL from `data-adf`, and need a scheme list the library keeps
|
||||||
from an author a consumer does not trust stays the consumer's, as the README says. The maintainer
|
current. Sanitizing HTML from an author a consumer does not trust stays the consumer's, as the
|
||||||
left a scheme filter for a later security addition.
|
README says.
|
||||||
|
|
||||||
## Nothing recurses unbounded
|
## Nothing recurses unbounded
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user