Yuki Takei пре 1 година
родитељ
комит
4d4292de38

+ 5 - 5
apps/app/src/components/Admin/MarkdownSetting/XssForm.jsx

@@ -6,7 +6,7 @@ import { defaultSchema as sanitizeDefaultSchema } from 'rehype-sanitize';
 
 
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
 import { toastSuccess, toastError } from '~/client/util/toastr';
 import { toastSuccess, toastError } from '~/client/util/toastr';
-import { RehypeSanitizeOption } from '~/interfaces/rehype';
+import { RehypeSanitizeType } from '~/interfaces/services/rehype-sanitize';
 import loggerFactory from '~/utils/logger';
 import loggerFactory from '~/utils/logger';
 
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { withUnstatedContainers } from '../../UnstatedUtils';
@@ -55,8 +55,8 @@ class XssForm extends React.Component {
                 className="form-check-input"
                 className="form-check-input"
                 id="xssOption1"
                 id="xssOption1"
                 name="XssOption"
                 name="XssOption"
-                checked={xssOption === RehypeSanitizeOption.RECOMMENDED}
-                onChange={() => { adminMarkDownContainer.setState({ xssOption: RehypeSanitizeOption.RECOMMENDED }) }}
+                checked={xssOption === RehypeSanitizeType.RECOMMENDED}
+                onChange={() => { adminMarkDownContainer.setState({ xssOption: RehypeSanitizeType.RECOMMENDED }) }}
               />
               />
               <label className="form-label form-check-label w-100" htmlFor="xssOption1">
               <label className="form-label form-check-label w-100" htmlFor="xssOption1">
                 <p className="fw-bold">{t('markdown_settings.xss_options.recommended_setting')}</p>
                 <p className="fw-bold">{t('markdown_settings.xss_options.recommended_setting')}</p>
@@ -97,8 +97,8 @@ class XssForm extends React.Component {
                 className="form-check-input"
                 className="form-check-input"
                 id="xssOption2"
                 id="xssOption2"
                 name="XssOption"
                 name="XssOption"
-                checked={xssOption === RehypeSanitizeOption.CUSTOM}
-                onChange={() => { adminMarkDownContainer.setState({ xssOption: RehypeSanitizeOption.CUSTOM }) }}
+                checked={xssOption === RehypeSanitizeType.CUSTOM}
+                onChange={() => { adminMarkDownContainer.setState({ xssOption: RehypeSanitizeType.CUSTOM }) }}
               />
               />
               <label className="form-label form-check-label w-100" htmlFor="xssOption2">
               <label className="form-label form-check-label w-100" htmlFor="xssOption2">
                 <p className="fw-bold">{t('markdown_settings.xss_options.custom_whitelist')}</p>
                 <p className="fw-bold">{t('markdown_settings.xss_options.custom_whitelist')}</p>

+ 0 - 1
apps/app/src/server/crowi/index.js

@@ -95,7 +95,6 @@ class Crowi {
     this.inAppNotificationService = null;
     this.inAppNotificationService = null;
     this.activityService = null;
     this.activityService = null;
     this.commentService = null;
     this.commentService = null;
-    this.xss = new Xss();
     this.questionnaireService = null;
     this.questionnaireService = null;
     this.questionnaireCronService = null;
     this.questionnaireCronService = null;