@@ -8,26 +8,30 @@ All notable changes to this project will be documented in this file.
8
8
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
9
9
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) . See the [ Contributing Guide] ( contributing.md ) for details.
10
10
11
- ## [ unreleased ]
11
+ ## [ 3.6 ] -- 2024-03-14
12
12
13
13
### Changed
14
14
15
15
#### Refactor TOC Sanitation
16
16
17
- * All postprocessors are run on heading content.
18
- * Footnote references are stripped from heading content. Fixes #660 .
17
+ * All postprocessors are now run on heading content.
18
+ * Footnote references are now stripped from heading content. Fixes #660 .
19
19
* A more robust ` striptags ` is provided to convert headings to plain text.
20
20
Unlike, the ` markupsafe ` implementation, HTML entities are not unescaped.
21
- * The plain text ` name ` , rich ` html ` and unescaped raw ` data-toc-label ` are
21
+ * The plain text ` name ` , rich ` html ` , and unescaped raw ` data-toc-label ` are
22
22
saved to ` toc_tokens ` , allowing users to access the full rich text content of
23
23
the headings directly from ` toc_tokens ` .
24
- * ` data-toc-label ` is sanitized separate from heading content.
25
- * A ` html.unescape ` call is made just prior to calling ` slugify ` so that
24
+ * The value of ` data-toc-label ` is sanitized separate from heading content
25
+ before being written to ` name ` . This fixes a bug which allowed markup through
26
+ in certain circumstances. To access the raw unsanitized data, retrieve the
27
+ value from ` token['data-toc-label'] ` directly.
28
+ * An ` html.unescape ` call is made just prior to calling ` slugify ` so that
26
29
` slugify ` only operates on Unicode characters. Note that ` html.unescape ` is
27
- not run on the ` name ` or ` html ` .
28
- * The ` get_name ` and ` stashedHTML2text ` functions defined in the ` toc ` extension
29
- are both ** deprecated** . Instead, use some combination of ` run_postprocessors ` ,
30
- ` render_inner_html ` and ` striptags ` .
30
+ not run on ` name ` , ` html ` , or ` data-toc-label ` .
31
+ * The functions ` get_name ` and ` stashedHTML2text ` defined in the ` toc ` extension
32
+ are both ** deprecated** . Instead, third party extensions should use some
33
+ combination of the new functions ` run_postprocessors ` , ` render_inner_html ` and
34
+ ` striptags ` .
31
35
32
36
### Fixed
33
37
0 commit comments