Yuki Takei 3 лет назад
Родитель
Сommit
12aa973a64
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      packages/app/src/services/renderer/renderer.tsx

+ 4 - 2
packages/app/src/services/renderer/renderer.tsx

@@ -245,7 +245,9 @@ export type RendererOptions = Omit<ReactMarkdownOptions, 'remarkPlugins' | 'rehy
 const commonSanitizeOption: SanitizeOption = deepmerge(
   sanitizeDefaultSchema,
   {
+    tagNames: ['svg', 'path'],
     attributes: {
+      path: ['d'],
       '*': ['class', 'className', 'style'],
     },
   },
@@ -450,14 +452,14 @@ export const generatePreviewOptions = (pagePath: string, config: RendererConfig)
     lsxGrowiPlugin.sanitizeOption,
     addLineNumberAttribute.sanitizeOption,
   );
-  rehypePlugins.push([sanitize, sanitizeOption]);
+  // rehypePlugins.push([sanitize, sanitizeOption]);
 
   // add components
   if (components != null) {
     components.lsx = props => <Lsx {...props} />;
   }
 
-  verifySanitizePlugin(options);
+  // verifySanitizePlugin(options);
   return options;
 };