angular-cn/packages/core/test/sanitization
Bjarki 6a9d7e5969 refactor(core): express trusted constants with tagged template literals (#40082)
The trustConstantHtml and trustConstantResourceUrl functions are only
meant to be passed constant strings extracted from Angular application
templates, as passing other strings or variables could introduce XSS
vulnerabilities.

To better protect these APIs, turn them into template tags. This makes
it possible to assert that the associated template literals do not
contain any interpolation, and thus must be constant.

Also add tests for the change to prevent regression.

PR Close #40082
2021-01-05 13:56:57 -08:00
..
html_sanitizer_spec.ts refactor(core): make HTML sanitizer return TrustedHTML (#39218) 2020-10-16 08:13:52 -07:00
sanitization_spec.ts refactor(core): express trusted constants with tagged template literals (#40082) 2021-01-05 13:56:57 -08:00
url_sanitizer_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00