blob: 252c7281925c61c5f434b67ed048200567666c82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
opinionated, standards non-compliant HTML parser meant to consume handwritten HTML.
Not particularly fast, probably.
- all tags must close *(even `<br/>`, `<meta/>`, `<link/>`)*
- tag names must be separated from the tag-body *(where the attributes go)* by a space character *(` `, 0x20)*
- attributes must use `"` as their quoting character AND attributes must be
quoted *(no `src=image.png` nonsense. is that- does that ever even happen? i hope not)*
- attribute keys, if they have a value, must have the `=` directly following the
key *(good: `src="image.png"`, bad: `src = "image.png`)*
- self-closing tags must have the closing `/` at the very end of the body *(directly before the `>`)*
- no > in tags except at the end (not even in attributes)
- inline `<script>` and `<style>` must have their closing-tag be
first-of-line *(excluding whitespace)*
|