diff --git a/CHANGELOG.md b/CHANGELOG.md index 2780df7..c2aed21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,9 @@ `localId` as `data-local-id`. Every other node is an element of class `adf-carry` holding the node's JSON in `data-adf` and showing its content, links included. Every URL is written as the ADF holds it, `javascript:` included: sanitize HTML from an author you do not trust before - showing it. `adfToHtml` refuses an inline card a link marks, as `unsupported-node-shape`: Atlassian's schema gives a - card no link mark, and HTML nests no link in a link. + showing it. `adfToHtml` refuses an inline card a link marks, in a block written as an element, as + `unsupported-node-shape`: Atlassian's schema gives a card no link mark, and HTML nests no link in + a link. - `htmlToAdf` reads `adfToHtml`'s HTML back to the document it came from, a carry element from its `data-adf`. It reads that HTML as a browser's `innerHTML` writes it too (a raw `"` in text, ` `, a raw `<` or `>` in an attribute value) and as a form post sends it (`\r\n` for each diff --git a/README.md b/README.md index 99a5371..ac8752f 100644 --- a/README.md +++ b/README.md @@ -526,7 +526,7 @@ content. No stylesheet ships. The complete dialect: | `rule` | `
`, ``, ``, the first mark outermost |
| an attribute its type holds that its element does not write, such as `localId`, on a paragraph, heading, quote, list, list item, code block, rule, emoji, mention, status, date or card | `data-*` named as HTML's `dataset` names it: `` |
-| any other node, or a node holding what its element cannot, except an inline card a link marks, which is refused | `
its content
`, a `` inline |
+| any other node, or a node holding what its element cannot, except an inline card a link marks in a block written as an element, which is refused | `its content
`, a `` inline |
- Every URL is written as the ADF holds it, `javascript:` included: a link's, an image's, a
card's, and a carried link's in the carry element. Sanitize the HTML before showing a document from
@@ -646,8 +646,9 @@ Every call can raise these:
twice, a block or a non-text inline node holding `text`, or a leaf block or a non-text inline node
holding `content`. Keep the ADF and show the document read-only; where you built the ADF, fix
what the message names.
-- **Writing, in `adfToHtml`**: an inline card marked by a link: Atlassian's schema gives a card no
- link mark, and HTML nests no link in a link. Keep the ADF and show the document read-only; where
+- **Writing, in `adfToHtml`**: an inline card marked by a link, in a block written as an element
+ (in a carried block it rides the carry): Atlassian's schema gives a card no link mark, and HTML
+ nests no link in a link. Keep the ADF and show the document read-only; where
you built the ADF, remove the link mark from the card the error's `path` names.
- **Writing, in `adfToPortableMarkdown`**: a line or task list the portable writer cannot spell.
This is a bug in this library: report it.
diff --git a/spec/html.md b/spec/html.md
index e72d9c5..ddd1b49 100644
--- a/spec/html.md
+++ b/spec/html.md
@@ -107,9 +107,9 @@ later release writes it as its own element.
- Characters HTML cannot hold are dropped.
- A node rides the carry where it holds a mark or a key its element does not write, an attribute
its type does not hold as that kind, an empty `attrs`, `content` or `marks`, or a value its
- element cannot hold. The exception is an inline card a link marks, which `adfToHtml` refuses as
- `unsupported-node-shape`: Atlassian's schema gives a card no link mark, and HTML nests no link in
- a link.
+ element cannot hold. The exception is an inline card a link marks, in a block written as an element:
+ `adfToHtml` refuses it as `unsupported-node-shape`, since Atlassian's schema gives a card no link
+ mark and HTML nests no link in a link. In a carried block it rides the carry.
- text holding no character, or a character HTML cannot hold; text holding a mark twice, or a
mark with attributes besides a link's `href` and `title`;
- an unmarked text node straight after one written as plain text, which would read back as one;