export let mdNoImages: MarkdownIt = new MarkdownIt();
+// Zero disables all rules.
+// Only explicitly allow a limited set of rules safe for use in post titles.
+export const mdLimited: MarkdownIt = new MarkdownIt("zero").enable([
+ "emphasis",
+ "backticks",
+ "strikethrough",
+]);
+
export const customEmojis: EmojiMartCategory[] = [];
export let customEmojisLookup: Map<string, CustomEmojiView> = new Map<
}
export function mdToHtmlInline(text: string) {
- return { __html: md.renderInline(text) };
+ return { __html: mdLimited.renderInline(text) };
}
const spoilerConfig = {