Skip to content

Commit

Permalink
feat: Add <audio crossorigin muted>, `<video crossorigin muted play…
Browse files Browse the repository at this point in the history
…sinline poster>` to default whitelist
  • Loading branch information
leizongmin committed May 6, 2021
1 parent f4c0b29 commit dcf1486
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,8 @@

- [Fix whitespace bypass #218](https://github.com/leizongmin/js-xss/pull/218/files) by @TomAnthony
- [Add `<summary>` to default whitelist #216](https://github.com/leizongmin/js-xss/pull/216) by @spacegaier
- [Add `<figure>` and `<figcaption>` to default whitelist](https://github.com/leizongmin/js-xss/pull/220) by @daraz999
- Add `<audio crossorigin muted>`, `<video crossorigin muted playsinline poster>` to default whitelist

## v1.0.8 (2020-07-27)

Expand Down
16 changes: 15 additions & 1 deletion dist/xss.js
Expand Up @@ -17,7 +17,15 @@ function getDefaultWhiteList() {
area: ["shape", "coords", "href", "alt"],
article: [],
aside: [],
audio: ["autoplay", "controls", "loop", "preload", "src"],
audio: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"preload",
"src",
],
b: [],
bdi: ["dir"],
bdo: ["dir"],
Expand All @@ -37,6 +45,8 @@ function getDefaultWhiteList() {
dl: [],
dt: [],
em: [],
figcaption: [],
figure: [],
font: ["color", "size", "face"],
footer: [],
h1: [],
Expand Down Expand Up @@ -77,7 +87,11 @@ function getDefaultWhiteList() {
video: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"playsinline",
"poster",
"preload",
"src",
"height",
Expand Down

0 comments on commit dcf1486

Please sign in to comment.