From 3f978d86f6e90fa6409b0a76eab65e6d82b53f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 22 May 2023 18:27:28 +0200 Subject: [PATCH] Strip tags of ToC item's aria label Some plugins/extensions might use the data-toc-label attribute of headings to set a particular string for the ToC item title. While not explicitly documented as possible or allowed, they might set some HTML code instead of text. In this case, the aria label of Toc nav elements break the HTML as they will contain unescaped double quotes. To fix this, we use the `striptags` filter to remove any tags from the aria label, keeping text only. --- material/partials/toc-item.html | 2 +- src/partials/toc-item.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/partials/toc-item.html b/material/partials/toc-item.html index 3f0ffe463..c83972729 100644 --- a/material/partials/toc-item.html +++ b/material/partials/toc-item.html @@ -6,7 +6,7 @@ {{ toc_item.title }} {% if toc_item.children %} -