Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"If the byte at encodingPosition is not 0x3D (=)..." #7193

Closed
JKingweb opened this issue Oct 10, 2021 · 2 comments · Fixed by #7202
Closed

"If the byte at encodingPosition is not 0x3D (=)..." #7193

JKingweb opened this issue Oct 10, 2021 · 2 comments · Fixed by #7202

Comments

@JKingweb
Copy link

JKingweb commented Oct 10, 2021

https://html.spec.whatwg.org/multipage/parsing.html#concept-get-xml-encoding-when-sniffing

  1. If the byte at encodingPosition is not 0x3D (=), then return failure.

  2. While the byte at encodingPosition is less than or equal to 0x20 (i.e., it is either an ASCII space or control character), advance encodingPosition to the next byte.

  3. Let quoteMark be the byte at encodingPosition.

This never advances encodingPosition past the = byte, meaning that quoteMark can never be a quotation mark. Step 7 should probably read something like:

  1. If the byte at encodingPosition is 0x3D (=), then advance encodingPosition to the next byte. Otherwise, return failure.
@annevk
Copy link
Member

annevk commented Oct 11, 2021

@hsivonen can you fix this?

@hsivonen
Copy link
Member

I'll fix this.

hsivonen added a commit to hsivonen/html that referenced this issue Oct 12, 2021
mfreed7 pushed a commit to mfreed7/html that referenced this issue Jun 3, 2022
domenic pushed a commit that referenced this issue Jul 8, 2022
These algorithms actually do not accept a timestamp, so it was incorrect to pass one. Closes #7193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants