Skip to content

Commit

Permalink
fix: Video not displayed in SNV - MEED-8360 - Meeds-io/meeds#2893. (#…
Browse files Browse the repository at this point in the history
…1328)

Before this change, when create an SNV with a media embed and save the
SNV, the media is not displayed. To resolve this problem, add the
ADD_TAGS: [iframe] property to the DOMPurify configuration. After this
change, SNV is displayed correctly.

(cherry picked from commit 07b079d)
  • Loading branch information
akhanfir authored and Jihed525 committed Feb 13, 2025
1 parent abe9f9d commit e542956
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
const DOMPurify = require('dompurify');
const pageContent = this.$root.pageContent && this.$noteUtils.getContentToDisplay(this.$root.pageContent) || '';
const sanitizedContent = DOMPurify.sanitize(pageContent, {
ADD_TAGS: ['iframe'],
tagNameCheck: () => true,
attributeNameCheck: () => true,
});
Expand Down

0 comments on commit e542956

Please sign in to comment.