diff --git a/news/changelog-1.5.md b/news/changelog-1.5.md index 7a031ecd8a..3ec25c1a0f 100644 --- a/news/changelog-1.5.md +++ b/news/changelog-1.5.md @@ -8,6 +8,7 @@ All changes included in 1.5: - ([#8862](https://github.com/quarto-dev/quarto-cli/issues/8862)): Properly deal with an `aside` within a definition list. - ([#8990](https://github.com/quarto-dev/quarto-cli/issues/8990)): Copy button now works for embedded code source in modal window when optin-in `code-tools` feature. - ([#9076](https://github.com/quarto-dev/quarto-cli/issues/9076)): Fix issue with `layout-ncol` and `column` settings in executable code cells. +- ([#9125](https://github.com/quarto-dev/quarto-cli/issues/9125)): Fix issue in browser console with TOC selection when the document is using ids for headers with specific characters (e.g russian language headers). ## PDF Format diff --git a/src/resources/formats/html/quarto.js b/src/resources/formats/html/quarto.js index 3ebd49cbd3..11803b02a7 100644 --- a/src/resources/formats/html/quarto.js +++ b/src/resources/formats/html/quarto.js @@ -94,7 +94,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) { if (link.href.indexOf("#") !== -1) { const anchor = link.href.split("#")[1]; const heading = window.document.querySelector( - `[data-anchor-id=${anchor}]` + `[data-anchor-id="${anchor}"]` ); if (heading) { // Add the class