angular/packages/compiler/test
Alan Agius 1829542aea fix(compiler): do not unquote CSS values (#49460)
Currently we are unsafely unquoting CSS values which in some cases causes valid values to become invalid and invalid values to become valid.

Example:
```html
<div style="width:&quot;1px;&quot;"></div>
```

In the above case, `width` has an invalid value of `"1px"`, however the compiler will transform it to `1px` which makes it valid.

On the other hand,  in the below case
```html
<div style="content:&quot;foo&quot;"></div>
```

`content` has a valid value of `"foo"`, but since the compiler unwraps it to `foo` it becomes invalid. For correctness, we should not remove quotes.

```js
const div = document.createElement('div');
div.style.width='"1px"';
div.style.content='foo';

div.style.width; // ''
div.style.content; // ''

div.style.width='1px';
div.style.content='"foo"';

div.style.width; // '1px'
div.style.content; // '"foo"'
```

More information about values can be found https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

PR Close #49460
2023-03-28 11:35:38 -07:00
..
expression_parser fix(compiler): handle trailing comma in object literal (#49535) 2023-03-23 11:35:44 -07:00
i18n refactor(common): add missing override to satisfy the linter (#49599) 2023-03-28 10:12:36 -07:00
ml_parser feat(compiler): allow self-closing tags on custom elements (#48535) 2023-01-04 12:07:37 -08:00
output test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
render3 fix(compiler): do not unquote CSS values (#49460) 2023-03-28 11:35:38 -07:00
schema fix(compiler): update element schema (#47552) 2022-10-11 17:21:47 +00:00
selector feat(compiler): allow self-closing tags on custom elements (#48535) 2023-01-04 12:07:37 -08:00
shadow_css fix(compiler): handle css selectors with space after an escaped character. (#48558) 2023-01-24 17:46:33 +00:00
BUILD.bazel build: refactor packages/compiler/test to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
compiler_facade_interface_spec.ts feat(compiler): add support for compile-time required inputs (#49468) 2023-03-20 13:10:30 +01:00
integration_spec.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00
security_spec.ts fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
style_url_resolver_spec.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00