Non-english characters are converted into html entities in browser view-source for Angular v16 Universal
sahilpurav opened this issue · 1 comments
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
In Angular 15, if we have any non-english characters (like Japanese or Chinese), in the view source, it was printing the exact characters. After I upgraded my application in Angular 16, I noticed that, these characters are now converted into html entities.
It shows properly on the front-end but I'm not sure if this is the right implementation for sites with non-english languages as the whole point of having SSR is fast TTFB and friendly SEO.
I'm attaching the screenshot of both Angular v15 and v16 version.
PS: This is not happening only for title tags. It happens even in body. I initially thought, it's an error in my code but then I took a fresh install of Angular v16 with SSR and change a text to some Japanese or Chinese character and I found the same issue.
Please provide a link to a minimal reproduction of the bug
https://codesandbox.io/p/sandbox/billowing-https-qfynnv
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 16.1.1
Node: 18.16.0
Package Manager: npm 9.5.1
OS: darwin x64
Angular: 16.1.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1601.1
@angular-devkit/build-angular 16.1.1
@angular-devkit/core 16.1.1
@angular-devkit/schematics 16.1.1
@angular/cli 16.1.1
@nguniversal/builders 16.1.0
@nguniversal/express-engine 16.1.0
@schematics/angular 16.1.1
rxjs 7.8.1
typescript 5.1.3
Anything else?
I have created a codesandbox URL for you to reproduce this issue. Head on to this URL and do a view source. Try to search anything with the Japanese character. You won't find anything as these characters are converted in $#codes;
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.