From 9114b1befb29a96e61c065a333dfabdf633d1bbc Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 14 Jul 2022 23:39:16 +0200 Subject: [PATCH] make sure the headings in TOC contain text only, https://github.com/zadam/trilium-web-clipper/issues/42 --- src/public/app/widgets/toc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.js index f8f7a2352..9d7105f22 100644 --- a/src/public/app/widgets/toc.js +++ b/src/public/app/widgets/toc.js @@ -143,7 +143,9 @@ export default class TocWidget extends CollapsibleWidget { // // Create the list item and set up the click callback // - const $li = $('
  • ' + m[2] + '
  • '); + + const headingText = $("
    ").html(m[2]).text(); + const $li = $('
  • ').text(headingText); // XXX Do this with CSS? How to inject CSS in doRender? $li.hover(function () { $(this).css("font-weight", "bold");