Skip to content

Commit

Permalink
add missing forbid tags config in sanitization (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanrikulu authored Jul 11, 2024
1 parent f64e898 commit 788f0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0-alpha.2.ethers.6",
"version": "1.0.0-alpha.3.ethers.6",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
4 changes: 3 additions & 1 deletion src/utils/getImageURI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function _sanitize(data: string, jsDomWindow?: any): Buffer {
});

// purges malicious scripting from svg content
const cleanDOM = DOMPurify.sanitize(data);
const cleanDOM = DOMPurify.sanitize(data, {
FORBID_TAGS: ['a', 'area', 'base', 'iframe', 'link'],
});
return Buffer.from(cleanDOM);
}

Expand Down

0 comments on commit 788f0f2

Please sign in to comment.