server-ts: Address requested changes

This commit is contained in:
Elian Doran
2024-04-13 17:30:48 +03:00
parent 1ac65fff47
commit a66e4435ba
6 changed files with 12 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ import importUtils = require('./utils');
function renderToHtml(content: string, title: string) {
const html = marked.parse(content, {
async: false
}) as string; // FIXME: mangle and headerIds does not seem to exist in marked
}) as string;
const h1Handled = importUtils.handleH1(html, title); // h1 handling needs to come before sanitization
return htmlSanitizer.sanitize(h1Handled);
}