Skip to content

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

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

Closed
1 task done
mbertuzzi opened this issue Jun 16, 2023 · 1 comment · Fixed by #25397
Closed
1 task done

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

mbertuzzi opened this issue Jun 16, 2023 · 1 comment · Fixed by #25397

Comments

@mbertuzzi
Copy link

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

@alan-agius4 alan-agius4 self-assigned this Jun 16, 2023
alan-agius4 added a commit to alan-agius4/critters that referenced this issue Jun 16, 2023
The latest version of critters introduced a breaking behaviour which causes special characters to be encoded.

This commit removes this behaviour and restores the previous one.

See: angular/angular-cli#25388
janicklas-ralph added a commit to GoogleChromeLabs/critters that referenced this issue Jun 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The latest version of critters introduced a breaking behaviour which causes special characters to be encoded.

This commit removes this behaviour and restores the previous one.

See: angular/angular-cli#25388

Co-authored-by: Janicklas Ralph <janicklas@google.com>
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 16, 2023
Update critters to the latest version.

Closes angular#25388
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 16, 2023
Update critters to the latest version.

Closes angular#25388
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 22, 2023
Update critters to the latest version.

Closes angular#25388
clydin pushed a commit that referenced this issue Jun 22, 2023
Update critters to the latest version.

Closes #25388
clydin pushed a commit that referenced this issue Jun 22, 2023
Update critters to the latest version.

Closes #25388

(cherry picked from commit f3f618f)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants