angular/packages/core/src/sanitization
Alan Agius 7dfb127c03 refactor: add @__PURE__ next to @pureOrBreakMyCode for improved bundler compatibility (#58297)
Added the `@__PURE__` annotation alongside `@pureOrBreakMyCode` to improve compatibility with third-party bundlers. This refactor follows optimization best practices, ensuring broader support across different tools, as `@pureOrBreakMyCode` was only supported by Closure Compiler.

PR Close #58297
2024-10-28 12:26:06 -07:00
..
bypass.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
html_sanitizer.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
iframe_attrs_validation.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
inert_body.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
readme.md refactor(core): move sanitization into core (#22540) 2018-03-07 18:24:06 -08:00
sanitization.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
sanitizer.ts refactor: add @__PURE__ next to @pureOrBreakMyCode for improved bundler compatibility (#58297) 2024-10-28 12:26:06 -07:00
security.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
url_sanitizer.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02: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.