@@ -8,26 +8,30 @@ All notable changes to this project will be documented in this file.
88The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
99and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) . See the [ Contributing Guide] ( contributing.md ) for details.
1010
11- ## [ unreleased ]
11+ ## [ 3.6 ] -- 2024-03-14
1212
1313### Changed
1414
1515#### Refactor TOC Sanitation
1616
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 .
1919* A more robust ` striptags ` is provided to convert headings to plain text.
2020 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
2222 saved to ` toc_tokens ` , allowing users to access the full rich text content of
2323 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
2629 ` 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 ` .
3135
3236### Fixed
3337
0 commit comments