diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/apidoc/markdown.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/apidoc/markdown.ts b/scripts/apidoc/markdown.ts index 88df0150..870b4201 100644 --- a/scripts/apidoc/markdown.ts +++ b/scripts/apidoc/markdown.ts @@ -39,10 +39,15 @@ const htmlSanitizeOptions: sanitizeHtml.IOptions = { function comparableSanitizedHtml(html: string): string { return html + .replace(/&#x[0-9A-F]{2};/g, (x) => + String.fromCodePoint(Number.parseInt(x.slice(3, -1), 16)) + ) .replace(/>/g, '>') - .replace(/ /g, '') + .replace(/</g, '<') + .replace(/&/g, '&') .replace(/"/g, '"') - .replace(/'/g, "'"); + .replace(/=""/g, '') + .replace(/ /g, ''); } /** |
