Skip to content

fix(compiler): prevents misinterpreting entity-encoded braces#67086

Open
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
SkyZeroZx:compiler/fix-escaped-double-braces
Open

fix(compiler): prevents misinterpreting entity-encoded braces#67086
SkyZeroZx wants to merge 1 commit intoangular:mainfrom
SkyZeroZx:compiler/fix-escaped-double-braces

Conversation

@SkyZeroZx
Copy link
Contributor

Avoids treating HTML entity encoded braces (e.g., {{) as interpolation delimiters.

fixes #62174

What is the current behavior?

@Component({
 template: `
   {{ demo }}
 `,
})
class App { }

throw

NG5002: Parser Error: Blank expressions are not allowed in interpolated strings at column 1 in [ {{ }} ] 

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Another option would be to improve the message so it points to a valid workaround when we detect entity encoding, since I’ve also run into this issue when asking AI agents (e.g., GitHub Copilot) to write documentation or examples.

avoids treating HTML entity-encoded braces (e.g., {{) as interpolation delimiters.

fixes  angular#62174
@pullapprove pullapprove bot requested a review from crisbeto February 16, 2026 20:42
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Feb 16, 2026
@ngbot ngbot bot added this to the Backlog milestone Feb 16, 2026
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.

escaped double braces are treated as interpolation

1 participant

Comments