Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for TrustedHTML #481

Merged

Conversation

raphael-inglin-ergon
Copy link
Contributor

feat: add support for TrustedHTML / trusted-types

Allows the user to supply HTML as TrustedHTML instead of only as string, to satisfy trusted-type policies. (see https://web.dev/trusted-types/)

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • others

Breaking Changes?

  • yes
  • no

Checklist

  • commit messages follow the Conventional Commits pattern
    • A feature commit message is prefixed "feat:"
    • A bugfix commit message is prefixed "fix:"
    • A document related commit is prefixed "docs:"
  • docs have been added / updated (for bug fixes / features)

Describe Your Changes

  • functions & constructors that allow passing HTML string now also accept TrustedHTML
  • icons configured by NgxEditorServiceConfig can be of type TrustedHTML in addition to string
  • SanitizeHtmlPipe only transforms values that are not already TrustedHTML

Does this PR affects any existing issues?

  • yes
  • no

raphael-inglin-ergon and others added 2 commits July 12, 2023 16:47
Allows the user to supply html as TrustedHTML instead of only as string,
to satisfy trusted-type policies. (see https://web.dev/trusted-types/)
Copy link
Owner

@sibiraj-s sibiraj-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@sibiraj-s sibiraj-s enabled auto-merge (squash) July 15, 2023 06:18
@sibiraj-s sibiraj-s merged commit e06dd44 into sibiraj-s:master Jul 15, 2023
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants