Skip to content

Commit 03734cf

Browse files
committed
Fix escaped HTML showing up in page navigation
Resolves #2224
1 parent f6dc882 commit 03734cf

File tree

6 files changed

+2306
-13
lines changed

6 files changed

+2306
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
### Bug Fixes
1313

14-
- Validation will no longer be skipped for sub packages when running with `--entryPointStrategy packages`.
14+
- Fixed `&` showing as `&` and HTML text showing up in page contents navigation, #2224.
1515
- Increased padding between sections when one navigation column is displayed, #2225.
1616
- Correct padding for navigation elements with a displayed icon, #2229.
1717
- Fixed `source-order` sort strategy failing to compare reflections within a file.
@@ -23,6 +23,7 @@
2323
- Fixed "Implementation of X.y" links if a mixture of methods and property-methods are used, #2233.
2424
- "Implementation of" text to symbol-properties not contained in the documentation will now use the resolved name instead of a `__@` symbol name, #2234.
2525
- Fix expansion of globs if a single entry point is provided, #2235.
26+
- Validation will no longer be skipped for sub packages when running with `--entryPointStrategy packages`.
2627
- Fixed broken theme toggle if the page contained a member named "theme".
2728

2829
### Thanks!

src/lib/output/themes/MarkedPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { RendererEvent, MarkdownEvent, PageEvent } from "../events";
77
import { BindOption, readFile, copySync, isFile } from "../../utils";
88
import { highlight, isSupportedLanguage } from "../../utils/highlighter";
99
import type { Theme } from "shiki";
10+
import { getTextContent } from "../../utils/html";
1011

1112
/**
1213
* Implements markdown and relativeURL helpers for templates.
@@ -192,7 +193,7 @@ output file :
192193
// Prefix the slug with an extra `$` to prevent conflicts with TypeDoc's anchors.
193194
this.page!.pageHeadings.push({
194195
link: `#md:${slug}`,
195-
text,
196+
text: getTextContent(text),
196197
level,
197198
});
198199
return `<a id="md:${slug}" class="tsd-anchor"></a><h${level}><a href="#$${slug}" style="color:inherit;text-decoration:none">${text}</a></h${level}>`;

0 commit comments

Comments
 (0)