Files
outline/shared/utils
Tom Moor 2a9ac3b456 Tighten how editor node and mark attributes are rendered (#13486)
* fix: Sanitize the embed toolbar link and anchor embed url matchers

The "Open" link in an embed's bottom bar wrote the node's href attribute
into the DOM without passing it through sanitizeUrl, so a javascript: url
in that attribute ran on click.

Two embed matchers, and the regex built from a team's embed integration
settings, were not anchored, so a javascript: url that contained a
supported url further along still matched an embed and reached that link.

* fix: Only emit a list style the editor renders

The listStyle attribute is written into a list-style-type declaration.
Its validator returned a boolean rather than throwing, which Prosemirror
ignores, so any string reached the style attribute and a crafted value
appended further CSS declarations to the element.

* fix: Sanitize the image urls carried in a mention's unfurl attribute

The unfurl attribute holds a cached copy of the unfurl response on the
node, and is used whenever the store has no live entry for the url. Its
favicon and avatar urls were written to an img src unchanged, so a
crafted mention made every reader's browser request a chosen host.

* fix: Render a heading level and highlight color that cannot be used

Both attributes are used unchecked when the node is rendered. rgba()
throws for a color it cannot parse, and a level outside of 1-6 produces
an invalid tag name, so either one stopped the whole document rendering
in the browser and on the server. The heading level also reached a
repeat() in the Markdown serializer, unbounded.

Fall back when rendering rather than when reading, so that a value
written through collaborative editing, which does not run the attribute
validators, is covered too.
2026-08-19 08:06:48 -04:00
..
2026-08-10 18:58:54 -04:00
2026-07-28 08:47:09 -04:00
2026-08-15 13:25:10 -04:00
2024-07-07 10:54:19 -04:00
2024-07-07 10:54:19 -04:00
2026-01-05 19:58:46 -05:00
2026-04-18 15:12:57 -04:00
2026-03-25 22:59:57 -04:00
2026-03-25 22:59:57 -04:00
2025-12-03 20:25:12 -05:00
2024-04-10 07:38:32 -04:00