Skip to content

Commit

Permalink
fix(deps): update dependency sanitize-html to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate-bot authored and julianlam committed Sep 29, 2020
1 parent 84f5e4c commit 1e5621c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions install/package.json
Expand Up @@ -108,7 +108,7 @@
"request-promise-native": "^1.0.8",
"rimraf": "3.0.2",
"rss": "^1.2.2",
"sanitize-html": "^1.23.0",
"sanitize-html": "^2.0.0",
"semver": "^7.2.1",
"serve-favicon": "^2.5.0",
"sharp": "0.26.1",
Expand Down Expand Up @@ -172,4 +172,4 @@
"url": "https://github.com/barisusakli"
}
]
}
}
8 changes: 3 additions & 5 deletions src/posts/parse.js
Expand Up @@ -14,15 +14,13 @@ var utils = require('../utils');
let sanitizeConfig = {
allowedTags: sanitize.defaults.allowedTags.concat([
// Some safe-to-use tags to add
'span', 'a', 'pre', 'small',
'sup', 'sub', 'u', 'del',
'sup', 'ins', 'del', 'img', 'button',
'video', 'audio', 'iframe', 'embed',
'img', 'tfoot', 'h1', 'h2',
's', 'button', 'i',
// 'sup' still necessary until https://github.com/apostrophecms/sanitize-html/pull/422 merged
]),
allowedAttributes: {
...sanitize.defaults.allowedAttributes,
a: ['href', 'hreflang', 'media', 'rel', 'target', 'type'],
a: ['href', 'name', 'hreflang', 'media', 'rel', 'target', 'type'],
img: ['alt', 'height', 'ismap', 'src', 'usemap', 'width', 'srcset'],
iframe: ['height', 'name', 'src', 'width'],
video: ['autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width'],
Expand Down

0 comments on commit 1e5621c

Please sign in to comment.