angular/packages/core/src/sanitization
Ramesh Thiruchelvam bc03a2e3e3 refactor(core): make the error messages tree shakable (#44359)
Long error messages can be tree-shaken in the production build and replaced with error codes.

See: https://github.com/angular/angular/pull/44219#issuecomment-983216374

PR Close #44359
2022-01-18 17:38:10 -08:00
..
bypass.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
html_sanitizer.ts perf(core): use ngDevMode to tree-shake warnings (#39959) 2020-12-04 10:21:36 -08:00
inert_body.ts fix(core): ensure sanitizer works if DOMParser return null body (#40107) 2021-01-06 10:32:24 -08:00
readme.md refactor(core): move sanitization into core (#22540) 2018-03-07 18:24:06 -08:00
sanitization.ts refactor(core): make the error messages tree shakable (#44359) 2022-01-18 17:38:10 -08:00
sanitizer.ts feat(core): manually annotate de-sugarred core tree-shakable providers with @pureOrBreakMyCode (#41096) 2021-03-08 10:30:08 -08:00
security.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_sanitizer.ts perf(core): use ngDevMode to tree-shake warnings (#39959) 2020-12-04 10:21:36 -08:00

Sanitization

This folder contains sanitization related code.

History

It used to be that sanitization related code used to be in @angular/platform-browser since it is platform related. While this is true, in practice the compiler schema is permanently tied to the DOM and hence the fact that sanitizer could in theory be replaced is not used in practice.

In order to better support tree shaking we need to be able to refer to the sanitization functions from the Ivy code. For this reason the code has been moved into the @angular/core.