|
@@ -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>
|