Skip to content

fix(compiler): restore audio src URL security context#68984

Closed
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:fix-66338-safe-resource-url-audio-src
Closed

fix(compiler): restore audio src URL security context#68984
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:fix-66338-safe-resource-url-audio-src

Conversation

@BHUVANSH855
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

After #66068, audio[src] no longer resolves to SecurityContext.URL.

As a result, bindings using SafeResourceUrl values may no longer unwrap correctly and can render the XSS error string instead of the actual URL.

Issue Number: #66338

What is the new behavior?

Restores SecurityContext.URL handling for audio[src], matching the existing compatibility handling for img[src] and video[src].

Also adds regression coverage to verify that audio[src] resolves to SecurityContext.URL.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This restores the previous behavior prior to #66068 for audio[src] bindings.

@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label May 28, 2026
@ngbot ngbot Bot added this to the Backlog milestone May 28, 2026
@alan-agius4
Copy link
Copy Markdown
Contributor

Thank you for taking the time to submit this contribution. Following an internal discussion, we've decided not to proceed with this change for now. We appreciate your effort and hope to see more from you in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants