Do I understand correctly that the old parser allows quoted attributes and multiple strings in attribute values, but does not allow multiple attributes without whitespace in between or multiple strings in attribute values _with_ whitespace in between?
Yes. (it also allows quoted and multiple name-parts in a attribute name if they do not contain spaces, eg:
'foo'bar=ga'zo'nk <-> foobar=gazonk
So
<t a="foo" "bar">
would have two attributes "a" and "bar",
Yes
and
<t a="foo""bar">
would have one attribute "a"?
Indeed (fun, right?).
Neither of these is valid HTML, so there is no particular reason to change the interpretation of either.
<t a="foo"b="bar">
does not have two quoted strings after each other, so there is no need to consider it for concatentation, and it can be interpreted as two attributes "a" and "b".
The strings do not have to be quoted to be considered for aggregation. Any string that does not contain non-quoted whitespaces will do.
So:
a="foo"bar='gazonk' would define the attribute 'a' with the value "foobar=gazonk" (this was one of the actually tested cases).
Is there an example of something which is valid HTML _and_ which would (for good reason) be interpreted as something else by the old parser?
Well, the one above. And, "for good reason" is relative, I guess.
I think the intended usecase was this:
foo="'"bar"'" to set the attribute "foo" to "'bar'"