You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
6
6
7
7
## [Unreleased][unreleased]
8
8
9
+
## [2.10.0] - 2026-08-11
10
+
11
+
This is a **security release** to address a denial of service vulnerability in the `AttributesExtension`.
12
+
9
13
### Added
10
14
- Added a new `table_of_contents/max_placeholder_entries` option to limit how many table of contents entries a document may render across all of its placeholders (#1134)
11
15
- Added `Cursor::matchInPlace()`, which matches a regular expression at the cursor's position within the line using PCRE's native offset semantics instead of copying the remainder (#1145)
@@ -830,7 +834,8 @@ No changes were introduced since the previous release.
830
834
- Alternative 1: Use `CommonMarkConverter` or `GithubFlavoredMarkdownConverter` if you don't need to customize the environment
831
835
- Alternative 2: Instantiate a new `Environment` and add the necessary extensions yourself
Copy file name to clipboardExpand all lines: docs/2.x/security.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,14 @@ The `xml/max_indentation_level` option (default: `16`) caps how far elements are
128
128
129
129
Note that `max_nesting_level` is *not* sufficient on its own here, as it only constrains how deeply **blocks** may nest - deeply-nested inlines (like `_______...`) can still produce a deep tree.
130
130
131
+
## Table of Contents Placeholders
132
+
133
+
This only applies if you're using the [Table of Contents extension](/2.x/extensions/table-of-contents/) with `'position' => 'placeholder'`.
134
+
135
+
In placeholder mode every placeholder renders its own copy of the table of contents, so a document containing many headings *and* many placeholders repeats that whole list at each one. A small input can therefore produce output many times its size.
136
+
137
+
The `table_of_contents/max_placeholder_entries` option bounds the total number of entries rendered across all of a document's placeholders; any placeholder beyond that budget is left as-is. It defaults to `null` (no limit) for backward compatibility, so setting an `int` is recommended when rendering untrusted input.
138
+
131
139
## Additional Filtering
132
140
133
141
Although this library does offer these security features out-of-the-box, some users may opt to also run the HTML output through additional filtering layers (like HTMLPurifier). If you do this, make sure you **thoroughly** test your additional post-processing steps and configure them to work properly with the types of HTML elements and attributes that converted Markdown might produce, otherwise, you may end up with weird behavior like missing images, broken links, mismatched HTML tags, etc.
0 commit comments