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

Fix #252: Actually parse charrefs in annotation #266

Merged
merged 1 commit into from
Nov 30, 2015

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented Nov 16, 2015

The syntax allowed charrefs in annotations, but the tokenizer didn't.

Rename "HTML character reference state" to "HTML character reference
in data state" and add a new "HTML character reference in annotation
state". Switch into the new state when seeing "&" in the "WebVTT
start tag annotation state".
#252

@zcorpan
Copy link
Member Author

zcorpan commented Nov 27, 2015

@foolip can you review?


<dd>

<p>Attempt to <a>consume an HTML character reference</a>, with the <a spec=html>additional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is right, because HTML says "optionally with an additional allowed character, which, if specified where the algorithm is invoked, adds a character to the list of characters that cause there to not be a character reference."

Without any context, I assumed this meant that > would be allowed as part of the character reference, which would the opposite of the intended.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the only difference from "no additional allowed character" is whether &> produces a parse error or not. WebVTT doesn't take note of the parse error, so for WebVTT there is technically no difference at all, currently. WebVTT's syntax doesn't allow lone ampersands, so it is a syntax violation regardless.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there's no actual difference... whatwg/html#364

@foolip
Copy link
Member

foolip commented Nov 30, 2015

👍

The syntax allowed charrefs in annotations, but the tokenizer didn't.

Rename "HTML character reference state" to "HTML character reference
in data state" and add a new "HTML character reference in annotation
state". Switch into the new state when seeing "&" in the "WebVTT
start tag annotation state".
@zcorpan zcorpan merged commit 148241b into gh-pages Nov 30, 2015
@zcorpan zcorpan deleted the charref-annotation branch November 30, 2015 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants