Skip to content

v16.1 build escapes special characters in index.html #25388

Description

@mbertuzzi

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

v16.0

Description

Building a project with some special characters in index.html (e.g. '$' or '&') makes them to be escaped in HTML format ($ or &)

immagine

Minimal Reproduction

Create a new empty angular 16.1 project, change the title e.g. with ${title} in index.html and build it.
In the dist folder the index.html has the escaped string ${title} instead of the original string

Exception or Error

No response

Your Environment

Angular CLI: 16.1.0
Node: 18.15.0
Package Manager: npm 9.5.0
OS: darwin x64

Angular: 16.1.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1601.0
@angular-devkit/build-angular   16.1.0
@angular-devkit/core            16.1.0
@angular-devkit/schematics      16.1.0
@angular/cli                    16.1.0
@schematics/angular             16.1.0
rxjs                            7.8.1
typescript                      5.0.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions