Просмотр исходного кода

add video tag to reccomend for sanitization
remove comment

Tatsuya Ise 1 год назад
Родитель
Сommit
1dfe222e2d

+ 1 - 1
apps/app/src/components/Admin/MarkdownSetting/WhitelistInput.jsx

@@ -16,7 +16,7 @@ class WhitelistInput extends React.Component {
     this.tagWhitelist = React.createRef();
     this.attrWhitelist = React.createRef();
 
-    this.tags = sanitizeDefaultSchema.tagNames;
+    this.tags = [...sanitizeDefaultSchema.tagNames, 'video'];
     this.attrs = JSON.stringify(sanitizeDefaultSchema.attributes);
 
     this.onClickRecommendTagButton = this.onClickRecommendTagButton.bind(this);

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

@@ -41,7 +41,7 @@ class XssForm extends React.Component {
     const { t, adminMarkDownContainer } = this.props;
     const { xssOption } = adminMarkDownContainer.state;
 
-    const rehypeRecommendedTags = sanitizeDefaultSchema.tagNames;
+    const rehypeRecommendedTags = [...sanitizeDefaultSchema.tagNames, 'video'];
     const rehypeRecommendedAttributes = JSON.stringify(sanitizeDefaultSchema.attributes);
 
     return (

+ 0 - 1
apps/app/src/styles/organisms/_wiki.scss

@@ -105,7 +105,6 @@
     border-left: 0.3rem solid #ddd;
   }
 
-  /** <img> tag has a max-width by default, but user can also add the <video> tag to a custom whitelist. */
   img,video {
     max-width: 100%;
     margin: 5px 0;