This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17558 - WebVTT: syntax should disallow "-->" in cue data
Summary: WebVTT: syntax should disallow "-->" in cue data
Status: RESOLVED FIXED
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-20 11:34 UTC by Simon Pieters
Modified: 2012-10-11 11:11 UTC (History)
6 users (show)

See Also:


Attachments

Description Simon Pieters 2012-06-20 11:34:50 UTC
The string --> needs to be banned from the allowed syntax in cue data.

Examples:

<c.-->foo

<v -->foo

foo-->
Comment 1 Silvia Pfeiffer 2012-06-20 12:58:21 UTC
(In reply to comment #0)
> The string --> needs to be banned from the allowed syntax in cue data.

Why? It might have some unexpected effects, but it's not invalid, IIUC.

> Examples:
> 
> <c.-->foo

This parses to <span class="--">foo


> <v -->foo

This parses to <span title="--">foo

 
> foo-->

This parses to foo--> IIUC.
Comment 2 Simon Pieters 2012-06-20 13:05:09 UTC
See step 43 in http://dev.w3.org/html5/webvtt/#webvtt-parser-algorithm (basically --> in cue data starts a new cue)
Comment 3 Silvia Pfeiffer 2012-06-20 13:06:54 UTC
(In reply to comment #2)
> See step 43 in http://dev.w3.org/html5/webvtt/#webvtt-parser-algorithm
> (basically --> in cue data starts a new cue)

Ah yeah, that's right, I remember. It also helps to "hide" comments.

But that doesn't mean it needs banning from cue data, does it?
Comment 4 Simon Pieters 2012-06-20 13:14:36 UTC
(In reply to comment #3)
> Ah yeah, that's right, I remember.

You sure what you remember isn't what the spec said before it was changed to make "-->" aggressively start a new cue?

> It also helps to "hide" comments.

No.

> But that doesn't mean it needs banning from cue data, does it?

It does.
Comment 5 Ian 'Hixie' Hickson 2012-08-07 22:47:27 UTC
Oops, yeah, not sure why I forgot to do this when I changed the parser.
Comment 6 contributor 2012-10-10 23:14:49 UTC
Checked in as WHATWG revision r7451.
Check-in comment: Make --> in cue payloads non-conforming since it won't be parsed right anyway.
http://html5.org/tools/web-apps-tracker?from=7450&to=7451
Comment 7 Cyril Concolato 2012-10-11 08:16:25 UTC
Hi,

I have a problem with this fix. What if I carry XML data (including XML comments) in the payload of a VTT metadata cues? The --> (end of comment) will be present and since the cue is a metadata cue, it won't be escaped.
Comment 8 Simon Pieters 2012-10-11 09:45:29 UTC
Cyril, please file a new bug. This was just making the allowed syntax match what the parser already does.
Comment 9 Cyril Concolato 2012-10-11 11:11:54 UTC
Done: https://www.w3.org/Bugs/Public/show_bug.cgi?id=19465