|
@@ -348,6 +348,7 @@ export const generateViewOptions = (
|
|
|
drawioPlugin.sanitizeOption,
|
|
drawioPlugin.sanitizeOption,
|
|
|
lsxGrowiPlugin.sanitizeOption,
|
|
lsxGrowiPlugin.sanitizeOption,
|
|
|
)],
|
|
)],
|
|
|
|
|
+ rehypeSanitizePlugin,
|
|
|
katex,
|
|
katex,
|
|
|
[toc.rehypePluginStore, { storeTocNode }],
|
|
[toc.rehypePluginStore, { storeTocNode }],
|
|
|
// [autoLinkHeadings, {
|
|
// [autoLinkHeadings, {
|
|
@@ -430,6 +431,8 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
remarkPlugins.push(breaks);
|
|
remarkPlugins.push(breaks);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const rehypeSanitizePlugin: Pluggable<any[]> | (() => void) = config.isEnabledXssPrevention
|
|
const rehypeSanitizePlugin: Pluggable<any[]> | (() => void) = config.isEnabledXssPrevention
|
|
|
? [sanitize, deepmerge(commonSanitizeOption, lsxGrowiPlugin.sanitizeOption)]
|
|
? [sanitize, deepmerge(commonSanitizeOption, lsxGrowiPlugin.sanitizeOption)]
|
|
|
: () => {};
|
|
: () => {};
|
|
@@ -443,6 +446,7 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
drawioPlugin.sanitizeOption,
|
|
drawioPlugin.sanitizeOption,
|
|
|
lsxGrowiPlugin.sanitizeOption,
|
|
lsxGrowiPlugin.sanitizeOption,
|
|
|
)],
|
|
)],
|
|
|
|
|
+ rehypeSanitizePlugin,
|
|
|
katex,
|
|
katex,
|
|
|
);
|
|
);
|
|
|
|
|
|
|
@@ -491,6 +495,7 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
drawioPlugin.sanitizeOption,
|
|
drawioPlugin.sanitizeOption,
|
|
|
addLineNumberAttribute.sanitizeOption,
|
|
addLineNumberAttribute.sanitizeOption,
|
|
|
)],
|
|
)],
|
|
|
|
|
+ rehypeSanitizePlugin,
|
|
|
katex,
|
|
katex,
|
|
|
);
|
|
);
|
|
|
|
|
|