mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 23:46:21 +01:00
Read adfToHtml's HTML in htmlToAdf as a browser serializes it too
This commit is contained in:
+4
-2
@@ -15,8 +15,10 @@
|
||||
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.
|
||||
- `htmlToAdf` reads `adfToHtml`'s HTML back to the document it came from, a carry element from its
|
||||
`data-adf`. It refuses any other HTML, including an edit to what a carry element shows, with the
|
||||
codes README §The calls lists.
|
||||
`data-adf`, also as a browser's `innerHTML` writes it (a raw `"` in text, ` `, a raw `<` or
|
||||
`>` in an attribute value) and as a form post sends it (`\r\n` for each line feed). It refuses
|
||||
any other HTML, including an edit to what a carry element shows, with the codes README §The calls
|
||||
lists.
|
||||
- **Breaking:** `losslessMarkdownToAdf` gives a `date`, `emoji`, `inlineCard`, `mention`, `status`
|
||||
or `mediaInline` only the marks Atlassian's schema lets it hold: `**!adf:mention[@A]{id=…}**` now
|
||||
reads as a plain mention. A link or directive mark around only nodes that cannot take it is
|
||||
|
||||
Reference in New Issue
Block a user