analsex
This commit is contained in:
@@ -26,20 +26,18 @@ async function getPostBySlug(slug: string) {
|
||||
// Configure marked options
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
headerIds: true,
|
||||
mangle: false
|
||||
breaks: true
|
||||
});
|
||||
|
||||
// Convert markdown to HTML
|
||||
const rawHtml = marked(content);
|
||||
const rawHtml = marked.parse(content);
|
||||
|
||||
// Create a DOM window for DOMPurify
|
||||
const window = new JSDOM('').window;
|
||||
const purify = DOMPurify(window);
|
||||
|
||||
// Sanitize the HTML
|
||||
processedContent = purify.sanitize(rawHtml, {
|
||||
processedContent = purify.sanitize(rawHtml as string, {
|
||||
ALLOWED_TAGS: [
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||
'p', 'a', 'ul', 'ol', 'li', 'blockquote',
|
||||
|
||||
Reference in New Issue
Block a user