angular/packages/compiler/test/render3
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
..
util refactor(compiler): remove parsing support for quote expressions (#44915) 2022-01-31 23:31:11 +00:00
view refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
BUILD.bazel build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
r3_ast_absolute_span_spec.ts fix(compiler): compute correct offsets when interpolations have HTML entities (#44811) 2022-03-08 10:23:07 -08:00
r3_ast_spans_spec.ts fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
r3_template_transform_spec.ts fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809) 2022-02-07 10:46:52 -08:00
README.md feat(compiler): implement "enableIvy" compiler option (#21427) 2018-01-18 18:22:44 -06:00
style_parser_spec.ts fix(compiler): do not unquote CSS values (#49460) 2023-03-28 11:35:38 -07:00

Tests in this directory are excluded from running in the browser and only run in node.