Skip to content

Commit

Permalink
fix(editor): Fix directive
Browse files Browse the repository at this point in the history
  • Loading branch information
cstuncsik committed Sep 17, 2024
1 parent ebaca47 commit baeda69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/design-system/src/directives/n8n-html.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Directive n8n-html', () => {
},
});
expect(html()).toBe(
'<div><span>text</span><a href="https://safe.com">safe</a><img alt="Ok" src="./images/logo.svg" /></div>',
'<div><span>text</span><a href="https://safe.com">safe</a><img alt="Ok" src="./images/logo.svg"></div>',
);
});
});
1 change: 1 addition & 0 deletions packages/design-system/src/directives/n8n-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const configuredSanitize = (html: string) =>
allowedTags: sanitize.defaults.allowedTags.concat(['img', 'input']),
allowedAttributes: {
...sanitize.defaults.allowedAttributes,
img: ['src', 'srcset', 'alt', 'title', 'width', 'height', 'loading'],
input: ['type', 'id', 'checked'],
},
});
Expand Down

0 comments on commit baeda69

Please sign in to comment.