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

fix[angular-gen2]: angular sanitizing html warning #3809

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sidmohanty11
Copy link
Contributor

@sidmohanty11 sidmohanty11 commented Jan 2, 2025

Description

Uses https://angular.dev/api/platform-browser/DomSanitizer to mark text as safe html to use inside innerHTML. As text is already sanitized from the HTML editor we should be able to bypass it safely. This only shows up in the dev server and we don't receive these warnings in a prod build.

Fixes #3793

Jira
https://builder-io.atlassian.net/browse/ENG-7950

Screenshot
Before
Screenshot 2025-01-02 at 6 43 43 PM
Screenshot 2025-01-02 at 6 43 50 PM
After
Screenshot 2025-01-02 at 6 42 52 PM
Screenshot 2025-01-02 at 6 45 39 PM

@sidmohanty11 sidmohanty11 requested review from samijaber and a team as code owners January 2, 2025 13:06
Copy link

changeset-bot bot commented Jan 2, 2025

🦋 Changeset detected

Latest commit: c439b16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@builder.io/sdk-angular Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

nx-cloud bot commented Jan 2, 2025

View your CI Pipeline Execution ↗ for commit c439b16.

Command Status Duration Result
nx test @e2e/angular-ssr ❌ Failed 5m 57s View ↗
nx test @e2e/angular ❌ Failed 5m 50s View ↗
nx test @e2e/react-sdk-next-pages ❌ Failed 1m 15s View ↗
nx test @e2e/nextjs-sdk-next-app ✅ Succeeded 7m 34s View ↗
nx test @e2e/nuxt ✅ Succeeded 6m 59s View ↗
nx test @e2e/react-native ✅ Succeeded 6m 35s View ↗
nx test @e2e/qwik-city ✅ Succeeded 6m 59s View ↗
nx test @e2e/sveltekit ✅ Succeeded 5m 10s View ↗
Additional runs (34) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-01-02 13:16:32 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular Gen2 - HTML sanitization warning
1 participant