diff --git a/client/package.json b/client/package.json
index 42d3ad03e..5025fec99 100644
--- a/client/package.json
+++ b/client/package.json
@@ -66,7 +66,6 @@
"@types/chart.js": "^2.9.37",
"@types/core-js": "^2.5.2",
"@types/debug": "^4.1.5",
- "@types/dompurify": "^3.0.5",
"@types/jschannel": "^1.0.0",
"@types/linkifyjs": "^2.1.2",
"@types/lodash-es": "^4.17.0",
diff --git a/client/src/app/core/renderer/html-renderer.service.ts b/client/src/app/core/renderer/html-renderer.service.ts
index c4a8c9fe7..d41d89d15 100644
--- a/client/src/app/core/renderer/html-renderer.service.ts
+++ b/client/src/app/core/renderer/html-renderer.service.ts
@@ -4,7 +4,7 @@ import {
getDefaultSanitizedSchemes,
getDefaultSanitizedTags
} from '@peertube/peertube-core-utils'
-import DOMPurify, { DOMPurifyI } from 'dompurify'
+import DOMPurify, { DOMPurify as DOMPurifyI } from 'dompurify'
import { LinkifierService } from './linkifier.service'
@Injectable()
@@ -24,7 +24,7 @@ export class HtmlRendererService {
}
private addHrefHook (dompurifyInstance: DOMPurifyI) {
- dompurifyInstance.addHook('afterSanitizeAttributes', node => {
+ dompurifyInstance.addHook('afterSanitizeAttributes', (node: HTMLElement) => {
if ('target' in node) {
node.setAttribute('target', '_blank')
@@ -40,7 +40,7 @@ export class HtmlRendererService {
private addCheckSchemesHook (dompurifyInstance: DOMPurifyI, schemes: string[]) {
const regex = new RegExp(`^(${schemes.join('|')}):`, 'im')
- dompurifyInstance.addHook('afterSanitizeAttributes', node => {
+ dompurifyInstance.addHook('afterSanitizeAttributes', (node: HTMLElement) => {
const anchor = document.createElement('a')
if (node.hasAttribute('href')) {
diff --git a/client/src/standalone/videos/test-embed.html b/client/src/standalone/videos/test-embed.html
index 84dc1c028..7f74dbef5 100644
--- a/client/src/standalone/videos/test-embed.html
+++ b/client/src/standalone/videos/test-embed.html
@@ -29,6 +29,7 @@
+
@@ -55,6 +56,11 @@