Clear up wording
This commit is contained in:
parent
7162cc2ca0
commit
89567988cf
10
README.md
10
README.md
|
@ -286,13 +286,15 @@ These elements are usually like content elements but are occasionally used like
|
||||||
|
|
||||||
### Attributes
|
### Attributes
|
||||||
|
|
||||||
Any entities in attribute values are decoded, and then the most optimal representation is calculated and used:
|
Any entities in attribute values are decoded, and then the shortest representation of the value is calculated and used:
|
||||||
|
|
||||||
- Double quoted, with any `"` encoded.
|
- Double quoted, with any `"` encoded.
|
||||||
- Single quoted, with any `'` encoded.
|
- Single quoted, with any `'` encoded.
|
||||||
- Unquoted, with `"`/`'` first character (if applicable), `>` last character (if applicable), and any whitespace encoded.
|
- Unquoted, with `"`/`'` first character (if applicable), `>` last character (if applicable), and any whitespace encoded.
|
||||||
|
|
||||||
Some attributes have their whitespace (after decoding) trimmed and collapsed, such as `class`.
|
Some attributes have their whitespace (after any decoding) trimmed and collapsed:
|
||||||
|
|
||||||
|
- `class`
|
||||||
|
|
||||||
If an attribute value is empty after any processing, it is completely removed (i.e. no `=`).
|
If an attribute value is empty after any processing, it is completely removed (i.e. no `=`).
|
||||||
|
|
||||||
|
@ -337,12 +339,12 @@ No ampersand can immediately follow a malformed entity e.g. `&am&`, `&&`, or `&&
|
||||||
|
|
||||||
### Attributes
|
### Attributes
|
||||||
|
|
||||||
Backticks (`` ` ``) are not valid quote marks and are not interpreted as such.
|
Backticks (`` ` ``) are not valid quote marks and not interpreted as such.
|
||||||
However, backticks are valid attribute value quotes in Internet Explorer.
|
However, backticks are valid attribute value quotes in Internet Explorer.
|
||||||
|
|
||||||
It is an error if there is:
|
It is an error if there is:
|
||||||
|
|
||||||
- whitespace between `=` and attribute names/values;
|
- whitespace between `=` and an attribute name/value;
|
||||||
- no whitespace before an attribute; and/or
|
- no whitespace before an attribute; and/or
|
||||||
- an unquoted attribute value.
|
- an unquoted attribute value.
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
```
|
```
|
||||||
These are true about the above snippet:
|
These are true about the above snippet:
|
||||||
- `document.querySelectorAll('script').length === 2`.
|
- `document.querySelectorAll('script').length === 2`.
|
||||||
- `!exec1 && exec2`.
|
- `!window.exec1 && window.exec2`.
|
||||||
- `document.querySelector('script[type="text/html"]')` has exactly one child node and it's a text node.
|
- `document.querySelector('script[type="text/html"]')` has exactly one child node and it's a text node.
|
||||||
|
|
||||||
## Comments
|
## Comments
|
||||||
|
@ -108,18 +108,3 @@ Main closing tag works because it is not in a comment.
|
||||||
<!--<script>-->
|
<!--<script>-->
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
Figure this out:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script type="text/plain"><!--
|
|
||||||
<script>
|
|
||||||
alert();
|
|
||||||
</script>
|
|
||||||
</script
|
|
||||||
<script>
|
|
||||||
alert();
|
|
||||||
</script>
|
|
||||||
</script>
|
|
||||||
<h1>Test</h1>
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue